D2ynum = solve(ode==0, D2y, 'maxdegree', 3);
Code generation failed due to unexpected object of type 'RootOf'.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Della
am 7 Jun. 2023
Beantwortet: Walter Roberson
am 8 Jun. 2023
Hi everyone, I am trying to run the code below, but Matlab keeps throwing this error message at me. Does anyone know whats the issue?
syms y Dy D2y x
k=5/8;
w=100;
q=1;
p=1;
r=0.06;
e=0.5;
a=1/3;
z=0.15;
t=0.9;
s1=2;
m1=0.5;
fstar=4.9259e-16;
b=0.9273;
t1=(1+(z*fstar)/(r+t*p*s1-m1))*(2200^((1-k)*(e/(1-e))))*(((1-a)/w*q*a)^(e/(1-e)))*(e/(1-e))*(1/(p*s1+r+(1-b)*fstar-m1))^((1-e*(1-a))/((1-a)*(1-e)));
ode = y-((1+(z*fstar)/(r+t*p*(Dy*x*s1/y)-((Dy*x*m1/y)+D2y*(x^2)*(s1^2)/(2*y))))*(x^((1-k)*(e/(1-e))))*(((1-a)/w*q*a)^(e/(1-e)))*(e/(1-e))*(1/(r+(1-b)*fstar+p*(Dy*x*s1/y)-((Dy*x*m1/y)+D2y*(x^2)*(s1^2)/(2*y))))^((1-e*(1-a))/((1-a)*(1-e))));
D2ynum = solve(ode==0,D2y);
D2ynum = D2ynum(3);
f = matlabFunction(D2ynum,"Vars",{x, [y Dy]});
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Ordinary Differential Equations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!