How to use the ode15i function in this code?
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
syms x(t)
m = 60;
k = 1;
F = 100;
fs = 0;
vmax = 10;
[K,E] = ellipke((x / pi-floor(x/pi))*pi);
s = sqrt(2) * E + ( 2 * ellipke(1/2) * floor(x / pi));
r = abs(((cos(x))^2+1)^1.5/sin(x))
Ds = diff(s, t)
D2s = diff(s, t, 2)
dnjstlafur = 0.5 * (((m * Ds^2) / r)) + abs(((m * Ds^2) / r - fs) - fs);
ode = m * D2s == sqrt(F^2 - dnjstlafur^2)
[V] = odeToVectorField(ode)
M = matlabFunction(V, 'vars', {'t', 'Y'});
[t, Y]= ode45(M,[0, 4],[0, 0]);
plot(t, V(:,2));
This is error message.
다음 사용 중 오류가 발생함: mupadengine/feval_internal
Invalid argument.
오류 발생: odeToVectorField>mupadOdeToVectorField (171번 라인)
T = feval_internal(symengine,'symobj::odeToVectorField',sys,x,stringInput);
오류 발생: odeToVectorField (119번 라인)
sol = mupadOdeToVectorField(varargin);
오류 발생: untitled (14번 라인)
[V] = odeToVectorField(ode)
I know I should use ode15i fuction, but I don't know how to use that function. Can anyone write the code for me?
0 comentarios
Respuestas (1)
Umang Pandey
el 31 de Oct. de 2023
Hi,
The error you are facing is due to the use of "odeToVectorField" function. The function can convert only quasi-linear differential equations. You can refer the following documentation for more information:
Please refer to the following documentation for implementation details and examples on using "ode15i" function:
Best,
Umang
0 comentarios
Ver también
Categorías
Más información sobre Symbolic Math Toolbox en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!