Risposto
whats preventing my code from generating the proper results
I don't know anythng about the physics of your scenario, but are you sure you are calculating NLOS_LOWER_BOUND correctly? The f...

circa un anno fa | 0

Risposto
Finding the optimal solution for a data with two variables
Here's a possible approach (I've used relative errors as the values of the two columns are an order of magnitude different): % ...

circa un anno fa | 0

| accettato

Risposto
Using loop to sum value of an array and summation
Here's one way: J=[1 2 3 4 5 6 1 2 3 4 5 6]; step = 3; ix = 1:step:numel(J); for i = 1:numel(ix) p(i) = sum(J(ix(i)...

circa un anno fa | 1

| accettato

Risposto
Solving a system of inequalities using an eigenfunction and if, else.
Your function needs to be more like this, for example. Set values of x outside the function, call the function with these value...

circa un anno fa | 0

| accettato

Risposto
Почему появилась ошибка?
Seems overcomplicated for a numerical solution! How about simply f = @(x) x - 5 - 1/3*cos(2*x+1) + 2*x./(2+x.^2); g = @(x) x ...

circa un anno fa | 0

Risposto
How to write 2D heat conduction exact solution for Inf n?
Your term sinh(n*pi*x/L) should be sin(n*pi*x/L). See the following code (which can be made more efficient!): L = 1; H = 2; ...

circa un anno fa | 1

| accettato

Risposto
Help with Riccati equation
You haven't defined B (in the function definition)

circa un anno fa | 0

Risposto
How to create a time function and make a line rotate at a certain angular speed?
Do you mean something like this? r2_length = 2; tend = 10; % s dt = 0.1; t = 0:dt:tend; omega = 1; % rad/s theta = omega*t...

circa un anno fa | 0

Risposto
Cannot get integral function to work for two limits
Try this %Enthalpy datum conditions (Kelvin) Ti=(25+273.15); %Input temperature (Kelvin) T1=(183+273.15); %Output tem...

circa un anno fa | 0

Risposto
I have some errors in executing the following code, can anyone help me please?
You have no initial guesses for y(5) and y(7). And what about y(6)?

circa un anno fa | 0

Risposto
How can I plot a diagram with 12-15 different colors
Specify the colors with RGB triplets. doc Color

circa un anno fa | 0

Risposto
This code give me an error of Index exceeds array bounds.
More like this? m=60; g=9.81; k=80; m_2=10; m_1=15; h=100; w=15; t=1:10:100; x = zeros(1,numel(t)); for i=1:numel(t) ...

circa un anno fa | 0

Risposto
Why does MATLAB grader refuses to get my answer with the double integral evaluation problem?
As follows Oops! I did the sum incorrectly! Should have been like this: % box side length delta = 0.01; % mid box points...

oltre un anno fa | 0

Risposto
initial condition vector longer than ODE vector?
Do it like this: a=2; b=5; % v0 is now set to 10 v0=10; % Using a,b to determine rest of variables R=10*a; C=0.0001...

oltre un anno fa | 1

| accettato

Risposto
Can some one fix this code? I am unable to understand this code? Though fixing one problem another problem is arising ! please help!
In the following line: G = (randn(Np,Mtot)+1j*randn(Np,Mtot))/sqrt(2); % When i=1, G is 1x20, but H is 20x2 so the following l...

oltre un anno fa | 0

Risposto
Connect all dots I polarplot
Like this? r=[10:36:360 10]; r = r/360*2*pi; s=[5,3.5,5,4,4,3.5,4,4.2,4.7,4, 5]; polarplot(r,s,'-x')

oltre un anno fa | 0

Risposto
I dont understand this error in line 653 and the end goal is to make a graph
Get rid of the gaps between Consibio and Cloud, and between Cloud and Datalog (In the file name and when calling it).

oltre un anno fa | 0

Risposto
How can I solve the following PDE?
Try setting tau = T - t, so that dA/dt = -dA/dtau etc, and A(T) , B(T) become A(0), B(0). i.e. turn the boundary value problem ...

oltre un anno fa | 0

Risposto
how to use ode45 to solve motion equation with Matrix
Does this help? %% Data M =[ 0.0210 0.0014 -0.0209 0 0 0 0 0 0.0014 ...

oltre un anno fa | 1

| accettato

Risposto
Subscript indices must either be real positive integers or logicals always show up. what should i do?
Well, this works, but you might want to check the correctness or otherwise of your mode_shape calculations (there are a lot of z...

oltre un anno fa | 1

Risposto
incorrect number or types of inputs or outputs for function 'int'
Replace your power calculation with power = (1/T_0) * trapz(t,y.^2); Edited - Walter is correct.

oltre un anno fa | 0

Risposto
Regula-falsi Method that keeps running
Brackets!! f = @(x) 2.^x - x.^2 - 2; % Function whose roots are desired xL = 4; xU = 5; % Initial guesses Tol = 1...

oltre un anno fa | 0

| accettato

Risposto
Trying to answer a math problem using newton's method but having problem in the function.
Matlab doesn't like implied multiplication (x ^ 2)z should be (x ^ 2)*z etc. Also, in Matlab log(x) is ln(x)

oltre un anno fa | 0

| accettato

Risposto
How to set multiple values of a threshold?
Here's one way: tolX1_4 = [1 1 1 1 1 -1 1 1 0 1 1 1 1 1 1 1 1 ...

oltre un anno fa | 0

| accettato

Risposto
Please help solve a system of differential equation
Here's a numerical approach: First manipulate the equations tspan = [0, 120]; ic = [80000, 0.001]; [t, xy] = ode45(@rate, ...

oltre un anno fa | 0

Risposto
how ode solver works
doc ode45 Go to the References section. The two references listed will supply you with all you need to know about the ode solv...

oltre un anno fa | 0

Risposto
Solve Differential Equation with initial conditions and function
Try modifying your if statement in Moment. Something like if x<a V =...; M = ...; elseif x>=a && x<L M = ... ...

oltre un anno fa | 0

Risposto
problem in creating function file using ode45
Are you looking for something like this? (I might have misinterpreted your equations!) O=1; a=pi/2; g=9.81; L=100; tspan ...

oltre un anno fa | 0

Risposto
how can eliminate negative data in erf function?
Should term2(i) = (sqrt(lemdaD)./(2.*e1(i))).*exp(-(v1(i).*sqrt_avgsnr - v2(i).* mu).^2./(2.*e1(i).^2)).*.... erf((e4(...

oltre un anno fa | 0

| accettato

Risposto
Why is my plot not showing for improved Euler method?
You need to keep track of each step. Your original simply overwrites the values of t and y at each step. dy=@(t,y) -(0.1/10^(1...

oltre un anno fa | 1

Carica altro