답변 있음

To find integral of a function in loop

Try replacing q = integral(f,6e-7, x); with q(i) = integral(f,6e-7, x(i));

To find integral of a function in loop

Try replacing q = integral(f,6e-7, x); with q(i) = integral(f,6e-7, x(i));

3달 전 | 0

| 수락됨

답변 있음

Numerical integration of the missile dynamic model

I don't know the actual problem, but if you look at your values of Y against time you will see that some of them are clearly div...

Numerical integration of the missile dynamic model

I don't know the actual problem, but if you look at your values of Y against time you will see that some of them are clearly div...

3달 전 | 0

| 수락됨

답변 있음

Monte Carlo simulation for probability of a multi part machine working

Here's one possibility: % each A part works 98% of the time. Each B works 91% of the time. % The machine has 12A and 7B parts....

Monte Carlo simulation for probability of a multi part machine working

Here's one possibility: % each A part works 98% of the time. Each B works 91% of the time. % The machine has 12A and 7B parts....

3달 전 | 0

| 수락됨

답변 있음

Need help on using trapz on a definite integral

Replace Final = Nach + Vor; by Final(i) = Nach + Vor;

Need help on using trapz on a definite integral

Replace Final = Nach + Vor; by Final(i) = Nach + Vor;

4달 전 | 0

답변 있음

Multiple parameter Non Linear Curve Fit- Error using ^

You probably need to use element by element multiplication and division etc in your definition of fun. I.e. use a.*b and a...

Multiple parameter Non Linear Curve Fit- Error using ^

You probably need to use element by element multiplication and division etc in your definition of fun. I.e. use a.*b and a...

4달 전 | 0

| 수락됨

답변 있음

How to separate plot titles on single line? [solved]

Define the titles with an extra space at the end of each word.

How to separate plot titles on single line? [solved]

Define the titles with an extra space at the end of each word.

4달 전 | 0

답변 있음

Plotting to test probability convergence

See my reply to your question at https://uk.mathworks.com/matlabcentral/answers/871048-how-to-do-integration-of-this-equation-an...

Plotting to test probability convergence

See my reply to your question at https://uk.mathworks.com/matlabcentral/answers/871048-how-to-do-integration-of-this-equation-an...

4달 전 | 0

| 수락됨

답변 있음

How to do integration of this equation and plot graph between T and y

Like this perhaps: u=0.020; x=0.025; z=0; t=5; eta= 0.6; P=200; C=500; ro= 1000; l=0.008; Alpha=17e-6; r = 0.01; % Gu...

How to do integration of this equation and plot graph between T and y

Like this perhaps: u=0.020; x=0.025; z=0; t=5; eta= 0.6; P=200; C=500; ro= 1000; l=0.008; Alpha=17e-6; r = 0.01; % Gu...

4달 전 | 0

| 수락됨

답변 있음

Making relative histogram for data, and a convergence diagram to see if enough trials have been run for monte carlo simulation.

Something like the following? N = 1000; Throwsum = zeros(N,1); Relativefreq = zeros(N,1); count = 0; for i=1:1000 throwD...

Making relative histogram for data, and a convergence diagram to see if enough trials have been run for monte carlo simulation.

Something like the following? N = 1000; Throwsum = zeros(N,1); Relativefreq = zeros(N,1); count = 0; for i=1:1000 throwD...

4달 전 | 0

| 수락됨

답변 있음

Runge Kutta and Binary Search to analyze system of ODEs

At the moment you have dj/dt = -K*d0^2; which means rate of reduction of radius is constant. Since d0^2 is a constant this m...

Runge Kutta and Binary Search to analyze system of ODEs

At the moment you have dj/dt = -K*d0^2; which means rate of reduction of radius is constant. Since d0^2 is a constant this m...

4달 전 | 0

| 수락됨

답변 있음

Gaussian Curve Plotting Issues

If you have 10000 individuals with a probability of 0.013 of being in group A, you would expect your curve to peak close to 130 ...

Gaussian Curve Plotting Issues

If you have 10000 individuals with a probability of 0.013 of being in group A, you would expect your curve to peak close to 130 ...

4달 전 | 0

답변 있음

Solve equation with 2 unknowns using solve

There are an infinite number of solutions! Restrict the range. One possibility is as follows bfn = @(a) acos(1.6-cos(a)); fn...

Solve equation with 2 unknowns using solve

There are an infinite number of solutions! Restrict the range. One possibility is as follows bfn = @(a) acos(1.6-cos(a)); fn...

4달 전 | 1

답변 있음

Is this formula correct for simulate 3D Water rocket

Probably vy = v0*cos(alpha); should be more like vy = v0*cos(alpha)*cos(beta); where beta is an angle that will point the r...

Is this formula correct for simulate 3D Water rocket

Probably vy = v0*cos(alpha); should be more like vy = v0*cos(alpha)*cos(beta); where beta is an angle that will point the r...

4달 전 | 0

답변 있음

Need to Produce a different size matrix on each iteration

Try the following wqe=[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15]; kli=[51;52;53;54;55;56;57;58;59;60;61;62;63;64;65]; hsd=size(kli...

Need to Produce a different size matrix on each iteration

Try the following wqe=[1;2;3;4;5;6;7;8;9;10;11;12;13;14;15]; kli=[51;52;53;54;55;56;57;58;59;60;61;62;63;64;65]; hsd=size(kli...

4달 전 | 0

| 수락됨

답변 있음

Getting error using syms to implement power formula

Like this? % Arbitrary values - replace with your own fs = 1; x_h = @(n) 1/(n+10)^2; %Power formula syms N...

Getting error using syms to implement power formula

Like this? % Arbitrary values - replace with your own fs = 1; x_h = @(n) 1/(n+10)^2; %Power formula syms N...

4달 전 | 0

| 수락됨

답변 있음

Solving a system of 12 ode’s with discrete data using Euler method

Look up interp1 doc interp1

Solving a system of 12 ode’s with discrete data using Euler method

Look up interp1 doc interp1

4달 전 | 0

| 수락됨

답변 있음

How to handle a variable inside matrix without using syms toolbox?

Are you looking for somethig like this; f = @(w) [1,-0.1409*w^2;0,1]*[1,0;1/286.48,1]*[1,-0.05493*w^2;0,1]... *[1,0;1/1793...

How to handle a variable inside matrix without using syms toolbox?

Are you looking for somethig like this; f = @(w) [1,-0.1409*w^2;0,1]*[1,0;1/286.48,1]*[1,-0.05493*w^2;0,1]... *[1,0;1/1793...

4달 전 | 0

| 수락됨

답변 있음

Issues in For loop

Have you intialised j (i.e. set j = 1;) before going into the for i = 1:38976 loop?

Issues in For loop

Have you intialised j (i.e. set j = 1;) before going into the for i = 1:38976 loop?

4달 전 | 0

답변 있음

How can I randomize cube positions in matlab?

Like this? E=1; N=3; Nsamples=10; d=randi(N,1,Nsamples); s=randi(2,1,Nsample...

How can I randomize cube positions in matlab?

Like this? E=1; N=3; Nsamples=10; d=randi(N,1,Nsamples); s=randi(2,1,Nsample...

4달 전 | 0

| 수락됨

답변 있음

how to I solve 2 eqns with 2 unknowns and plot 5 plots according to these solutions?

Here's a possible way. Only you will know if the results make sense deltaGrxn_std_rxn1 = -24800; %(J/mol) deltaHrxn_std_rxn1 ...

how to I solve 2 eqns with 2 unknowns and plot 5 plots according to these solutions?

Here's a possible way. Only you will know if the results make sense deltaGrxn_std_rxn1 = -24800; %(J/mol) deltaHrxn_std_rxn1 ...

4달 전 | 0

답변 있음

Why do I get different results from the numerical solution and the analytical solution with ODE15S? The numerical solution looks smoother than the analytical one

% replace m_Soil = m_Soil_initial .* exp(- k1(i) .* t_measured(i+1)); % by m_Soil = m_Soil_initial .* exp(- k1(i) .* (t_mea...

Why do I get different results from the numerical solution and the analytical solution with ODE15S? The numerical solution looks smoother than the analytical one

% replace m_Soil = m_Soil_initial .* exp(- k1(i) .* t_measured(i+1)); % by m_Soil = m_Soil_initial .* exp(- k1(i) .* (t_mea...

4달 전 | 1

| 수락됨

답변 있음

Why do I get different results from the numerical solution and the analytical solution with ODE15S? The numerical solution looks smoother than the analytical one

Much easier to follow! Your "analytical" solution is incorrect for "constants" that change with time. See the following %% Re...

Why do I get different results from the numerical solution and the analytical solution with ODE15S? The numerical solution looks smoother than the analytical one

Much easier to follow! Your "analytical" solution is incorrect for "constants" that change with time. See the following %% Re...

4달 전 | 0

답변 있음

must return a column vector

Do you want something like this sp=-0.5:0.5:14.5; for i = 1:length(sp) [t,y(:,i)]=ode45(@(t,y) phy_ode_1(t,y,sp(i)),0:0.5:1...

must return a column vector

Do you want something like this sp=-0.5:0.5:14.5; for i = 1:length(sp) [t,y(:,i)]=ode45(@(t,y) phy_ode_1(t,y,sp(i)),0:0.5:1...

4달 전 | 1

| 수락됨

답변 있음

Finding a range of data greater than 0.1

There must be a neater way, but the following might help: X = [ 0.02 0.17 0.32 0.28 0.04 -0.07 -0.01 -0.19 -0.45 ....

Finding a range of data greater than 0.1

There must be a neater way, but the following might help: X = [ 0.02 0.17 0.32 0.28 0.04 -0.07 -0.01 -0.19 -0.45 ....

4달 전 | 0

| 수락됨

답변 있음

How to use ode45 with a time dependant second order differential equation

Turn your second order equation into two simultaneous first order equations.

How to use ode45 with a time dependant second order differential equation

Turn your second order equation into two simultaneous first order equations.

4달 전 | 0

답변 있음

how can i solve this problem with rk4 method?

If m=20, k=20, c=40 then function f should be f = -(c/m)*v - k/m f=@(t,x,v) -2*v -x; %dvdt

how can i solve this problem with rk4 method?

If m=20, k=20, c=40 then function f should be f = -(c/m)*v - k/m f=@(t,x,v) -2*v -x; %dvdt

4달 전 | 0

| 수락됨

답변 있음

How to solve a function with different ranges

Try C_ox = [16;15;7.5;2;7.5;15;15]; C_ox(C_ox<=15)=C_ox(C_ox<=15)/15; C_ox(C_ox>15)=1

How to solve a function with different ranges

Try C_ox = [16;15;7.5;2;7.5;15;15]; C_ox(C_ox<=15)=C_ox(C_ox<=15)/15; C_ox(C_ox>15)=1

4달 전 | 0

답변 있음

how can i solve second order ODE with RK-4 without using a built in function in matlab?

This K11 = RK4(t(i), y1(:, i)); should be | K11 = RK4(t(i), y(:, i)); and this f12 = -3*y(1)+30*t+10; ...

how can i solve second order ODE with RK-4 without using a built in function in matlab?

This K11 = RK4(t(i), y1(:, i)); should be | K11 = RK4(t(i), y(:, i)); and this f12 = -3*y(1)+30*t+10; ...

4달 전 | 0

| 수락됨