How to use the ode15i function in this code?

조회 수: 1 (최근 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 CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

태그

제품


릴리스

R2023a

Community Treasure Hunt

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

Start Hunting!