How to use the ode15i function in this code?

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?

Antworten (1)

Umang Pandey
Umang Pandey am 31 Okt. 2023

0 Stimmen

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

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Hilfe-Center und File Exchange

Produkte

Version

R2023a

Tags

Gefragt:

am 24 Okt. 2023

Beantwortet:

am 31 Okt. 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!