Answered

How to solve following BVP ODE?

Weird ODE and initial boundary condition! You can solve for small values of x using the following (where y(x=0) was chosen by t...

How to solve following BVP ODE?

Weird ODE and initial boundary condition! You can solve for small values of x using the following (where y(x=0) was chosen by t...

ungefär 5 timmar ago | 0

Answered

Array indexes must be positive integers or logical values.

Looks like you are using SUM when you want sum. Change to: SUM= E1*sum(V(3:IOUT+1,JOUT+2)).... Also, in line 59, you should h...

Array indexes must be positive integers or logical values.

Looks like you are using SUM when you want sum. Change to: SUM= E1*sum(V(3:IOUT+1,JOUT+2)).... Also, in line 59, you should h...

en dag ago | 1

| accepted

Answered

How to get real solutions of a "system of nonlinear equations"?

If you are willing to do the differentiation by hand then the following works % L = 2*x^2 -2*x*y+y^3 + lambda*(x^2 + y^2 -4); ...

How to get real solutions of a "system of nonlinear equations"?

If you are willing to do the differentiation by hand then the following works % L = 2*x^2 -2*x*y+y^3 + lambda*(x^2 + y^2 -4); ...

4 dagar ago | 0

Answered

Calling Euler Method to solve Shooting Method

You need to express your 2nd order ode as two 1st order odes y``(x) + 5y`(x) + 4y(x) = 1 v = dy/dx dv/dx = y``(x) So you h...

Calling Euler Method to solve Shooting Method

You need to express your 2nd order ode as two 1st order odes y``(x) + 5y`(x) + 4y(x) = 1 v = dy/dx dv/dx = y``(x) So you h...

5 dagar ago | 0

| accepted

Answered

solving Diffrential equation one parameter related to another one

Like this? %% Input Parameters Rs = 200; Rr = 180; Phi = 180; t = 0:1:359; e = Rs - Rr; %% Calculation B = @(t) e*co...

solving Diffrential equation one parameter related to another one

Like this? %% Input Parameters Rs = 200; Rr = 180; Phi = 180; t = 0:1:359; e = Rs - Rr; %% Calculation B = @(t) e*co...

5 dagar ago | 0

Answered

error handling for complex equation

nchoosek(pc-1+iL,pc-1-k) Your value of pc-1-k isn't a non-negative integer, but it needs to be for nchoosk. Also why use s...

error handling for complex equation

nchoosek(pc-1+iL,pc-1-k) Your value of pc-1-k isn't a non-negative integer, but it needs to be for nchoosk. Also why use s...

5 dagar ago | 0

Answered

merging two ode graphs

Your testode2 function must return a column vector. Try function dy = testode2(~,y) %%% Must return a column vector j=1;bet...

merging two ode graphs

Your testode2 function must return a column vector. Try function dy = testode2(~,y) %%% Must return a column vector j=1;bet...

5 dagar ago | 0

Answered

Simulation of differential equations with multiple variables. Biotechnology

You set umax to be 0.33, but then treat it as a function in the definition of f. If umax should simply be multiplied by the oth...

Simulation of differential equations with multiple variables. Biotechnology

You set umax to be 0.33, but then treat it as a function in the definition of f. If umax should simply be multiplied by the oth...

5 dagar ago | 0

| accepted

Answered

How can I keep on rejecting the value of input until the value inputted is greater than 0? Like how can they loop separately until the correct value is input?

Something like: dataX = -1; dataY = -1; while dataX<0 a=input('Please enter the X co-ordinate of the bottom left hand ...

How can I keep on rejecting the value of input until the value inputted is greater than 0? Like how can they loop separately until the correct value is input?

Something like: dataX = -1; dataY = -1; while dataX<0 a=input('Please enter the X co-ordinate of the bottom left hand ...

7 dagar ago | 0

| accepted

Answered

Solving system of simultanous ODE equations with Multiple Initial conditions

You could try something like: for i = 1:numel(CA0) [t, y]= ode15s(@kinatic3,tspan, [CA0(i) CB0(i) CC0(i)], option); f...

Solving system of simultanous ODE equations with Multiple Initial conditions

You could try something like: for i = 1:numel(CA0) [t, y]= ode15s(@kinatic3,tspan, [CA0(i) CB0(i) CC0(i)], option); f...

7 dagar ago | 0

| accepted

Answered

Solve an equation like the HP calculator solve

Use fzero. Replace the last line of your code with the following To2fn = @(To2) (1/alfa).*(((To2/p2).*sinh((A*p2)./(2.*To2)))./...

Solve an equation like the HP calculator solve

Use fzero. Replace the last line of your code with the following To2fn = @(To2) (1/alfa).*(((To2/p2).*sinh((A*p2)./(2.*To2)))./...

7 dagar ago | 0

Answered

Finding and reporting the variable (Single number) of several with the largest value

Here's one possibility ABC = [0.0076, 0.46, 0.05]; abc = ['A','B','C']; greatestValue = abc(ABC==max(ABC))

Finding and reporting the variable (Single number) of several with the largest value

Here's one possibility ABC = [0.0076, 0.46, 0.05]; abc = ['A','B','C']; greatestValue = abc(ABC==max(ABC))

8 dagar ago | 0

Answered

Error while solving nonlinear differential equations using ode45

Then this line [t,y0]=ode45(@evapmodel,tspan,y0); should presumably be [t,y0]=ode45(@evapfunc,tspan,y0);

Error while solving nonlinear differential equations using ode45

Then this line [t,y0]=ode45(@evapmodel,tspan,y0); should presumably be [t,y0]=ode45(@evapfunc,tspan,y0);

9 dagar ago | 0

| accepted

Answered

Maxwell-Boltzmann Fit with different constant (air-absorption) for each data Point

You could try using fminsearch to estimate B. Something along the lines of: data = % enter your data to be fitted my = % ente...

Maxwell-Boltzmann Fit with different constant (air-absorption) for each data Point

You could try using fminsearch to estimate B. Something along the lines of: data = % enter your data to be fitted my = % ente...

9 dagar ago | 0

Answered

How can I solve the function numerically for changing Prandtl Numbers ? I couldn't handle this with a for loop inside of a function.

Like this? a = 0; b = 5; N = 1600; eta = (0:0.2:b); numberofeta=length(eta); A = zeros(numberofeta,6); %%%%%%%% B=ones(numb...

How can I solve the function numerically for changing Prandtl Numbers ? I couldn't handle this with a for loop inside of a function.

Like this? a = 0; b = 5; N = 1600; eta = (0:0.2:b); numberofeta=length(eta); A = zeros(numberofeta,6); %%%%%%%% B=ones(numb...

10 dagar ago | 0

| accepted

Answered

Plot all if condition with for loop

Do you mean like this: s = 0:0.1:1; for i=1:numel(s) if s(i) > 0 && s(i) <1 %avoid dividing by 0 Z2=sqrt((X.^2)+...

Plot all if condition with for loop

Do you mean like this: s = 0:0.1:1; for i=1:numel(s) if s(i) > 0 && s(i) <1 %avoid dividing by 0 Z2=sqrt((X.^2)+...

14 dagar ago | 0

| accepted

Answered

How do i solve this equation system?

Try fzero: d1 = 13; g = 9.81; d3 = d1/2; L2 = 72e3; L3 = 40e3; zb = 372; zc = 290; f1 = 0.02; c2 = 89; c3 = 45; w1 = ...

How do i solve this equation system?

Try fzero: d1 = 13; g = 9.81; d3 = d1/2; L2 = 72e3; L3 = 40e3; zb = 372; zc = 290; f1 = 0.02; c2 = 89; c3 = 45; w1 = ...

15 dagar ago | 0

Answered

Return function to go back to the beginning of the script

Make the euler routine a function and call it from a while loop. Along the lines of: ... while error>0.1 [h, error] = E...

Return function to go back to the beginning of the script

Make the euler routine a function and call it from a while loop. Along the lines of: ... while error>0.1 [h, error] = E...

15 dagar ago | 0

| accepted

Answered

Solve this using MATLAB

Replace F^2 in the first equation using the second equation. This will give you a fifth order polynomial in G. Use the roots f...

Solve this using MATLAB

Replace F^2 in the first equation using the second equation. This will give you a fifth order polynomial in G. Use the roots f...

16 dagar ago | 0

Answered

Improve Mathworks Euler method

The method is ok, though could be more streamlined, for example: f1=@(x) 5*x+50; f2 =@(x,y) x*10 +10*y; x1=0; y1=0; x2=0; ...

Improve Mathworks Euler method

The method is ok, though could be more streamlined, for example: f1=@(x) 5*x+50; f2 =@(x,y) x*10 +10*y; x1=0; y1=0; x2=0; ...

18 dagar ago | 0

Answered

How to solve the problem?

Like this? x=0:.1:2; y=0:.1:2; b=0.5;[X, Y]=meshgrid(x, y); uxy=zeros(size(X)); for a=1:2 m=a^2; pn=(16*m*sinh(pi*Y/2*a...

How to solve the problem?

Like this? x=0:.1:2; y=0:.1:2; b=0.5;[X, Y]=meshgrid(x, y); uxy=zeros(size(X)); for a=1:2 m=a^2; pn=(16*m*sinh(pi*Y/2*a...

18 dagar ago | 1

| accepted

Answered

Real solutions to polynomials

Try B = x^6 - x^4/5 + 14*x^2 - 2*x - 10 == 0; b = vpasolve(B,x) C = x^5 - 4*x^3 + 4*x^2 - (4*x)/3 - 10/3 == 0; c = vpasolve(...

Real solutions to polynomials

Try B = x^6 - x^4/5 + 14*x^2 - 2*x - 10 == 0; b = vpasolve(B,x) C = x^5 - 4*x^3 + 4*x^2 - (4*x)/3 - 10/3 == 0; c = vpasolve(...

19 dagar ago | 0

Answered

Error while performing integration

Like this: x=1:0.1:5; a=5; for i=1:length(x) z(i)=sqrt(a^2-x(i).^2); Q2(i)=quad(@(y) Zdirection(y,x(i),a),0,z(i)); %%%%%%%...

Error while performing integration

Like this: x=1:0.1:5; a=5; for i=1:length(x) z(i)=sqrt(a^2-x(i).^2); Q2(i)=quad(@(y) Zdirection(y,x(i),a),0,z(i)); %%%%%%%...

19 dagar ago | 0

| accepted

Answered

Use -> Basic fitting -> liner equation using code rather then the manual process

help polyfit help polyval

Use -> Basic fitting -> liner equation using code rather then the manual process

help polyfit help polyval

20 dagar ago | 0

Answered

how to Number the data points in the scatter plot – in increasing order of X

Here's one way: x=[2.6498, 5.4147, 7.7189, 7.9493, 7.2581, 47.5806, 44.1244, 78.4562, 73.3871, 74.3088, 91.8203, 96.659, 95.967...

how to Number the data points in the scatter plot – in increasing order of X

Here's one way: x=[2.6498, 5.4147, 7.7189, 7.9493, 7.2581, 47.5806, 44.1244, 78.4562, 73.3871, 74.3088, 91.8203, 96.659, 95.967...

22 dagar ago | 1

| accepted

Answered

How to change values for variables that are defined in a equation

More like this perhaps (of course you will need to use your on values for the constants): a = [75, 96.4]; b = [13.8, 14.1]; c...

How to change values for variables that are defined in a equation

More like this perhaps (of course you will need to use your on values for the constants): a = [75, 96.4]; b = [13.8, 14.1]; c...

24 dagar ago | 0

Answered

plotting is giving me multiple lines

A little more like this perhaps: %%%FIBER Ef=220e9;%[N/m] GPA to Newton/square meter Vf=.63; %fiber volume fraction vf=.33;%...

plotting is giving me multiple lines

A little more like this perhaps: %%%FIBER Ef=220e9;%[N/m] GPA to Newton/square meter Vf=.63; %fiber volume fraction vf=.33;%...

24 dagar ago | 0

Answered

I try to find the air under the curve of this signal

Like this? datacq= load('Acquisition.txt'); datacq(:,1)=datacq(:,1)-datacq(1,1); t=datacq(:,1)*10^-3; accelerationz=abs(data...

I try to find the air under the curve of this signal

Like this? datacq= load('Acquisition.txt'); datacq(:,1)=datacq(:,1)-datacq(1,1); t=datacq(:,1)*10^-3; accelerationz=abs(data...

25 dagar ago | 0

| accepted

Answered

ode45 second order

Matlab indices start at 1, so you want dy = [y(2); 3.6*sin(t) - 60*y(1) - 5*y(2)];

ode45 second order

Matlab indices start at 1, so you want dy = [y(2); 3.6*sin(t) - 60*y(1) - 5*y(2)];

25 dagar ago | 0