답변 있음
help me solve this if statement
Remove the ] in the top line! Then number = randi([0,9]) evens = [2,4,6,8]; odds = [1,3,5,7,9]; if ismember(number,evens) ...

4년 초과 전 | 0

답변 있음
𝑦 = 2𝑐𝑜𝑠3𝑥
help plot

거의 5년 전 | 0

답변 있음
Error: ode45 Must return a column vector?
Like this? % the total time domain response % System parameters k3 = 15; k1 = 10.0; k2 = 10.0; m1 = 2.0; m2 = 6.0; L = 1.0;...

거의 5년 전 | 1

| 수락됨

답변 있음
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...

거의 5년 전 | 1

| 수락됨

답변 있음
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...

거의 5년 전 | 1

| 수락됨

답변 있음
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); ...

거의 5년 전 | 0

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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년 전 | 0

| 수락됨

답변 있음
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 ...

거의 5년 전 | 0

| 수락됨

답변 있음
How to solve ODE system numerically
help ode45

거의 5년 전 | 1

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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)))./...

거의 5년 전 | 0

| 수락됨

답변 있음
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))

거의 5년 전 | 0

답변 있음
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);

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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)+...

거의 5년 전 | 0

| 수락됨

답변 있음
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 = ...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 0

| 수락됨

답변 있음
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...

거의 5년 전 | 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; ...

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 1

| 수락됨

답변 있음
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(...

거의 5년 전 | 0

답변 있음
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)); %%%%%%%...

거의 5년 전 | 0

| 수락됨

답변 있음
Use -> Basic fitting -> liner equation using code rather then the manual process
help polyfit help polyval

거의 5년 전 | 0

답변 있음
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...

거의 5년 전 | 2

| 수락됨

답변 있음
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...

거의 5년 전 | 0

더 보기