How to use the ode15i function in this code?

2 ビュー (過去 30 日間)
Student
Student 2023 年 10 月 24 日
回答済み: Umang Pandey 2023 年 10 月 31 日
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?

回答 (1 件)

Umang Pandey
Umang Pandey 2023 年 10 月 31 日
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

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

タグ

製品


リリース

R2023a

Community Treasure Hunt

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

Start Hunting!