Good Afternoon,
Unfortunately I have a few issues using ode15i. As this is the first timi I have to use the MATLAB's integrated solver, I can't seem to figure out my mistake on my own. I keep getting the Error "Not Enought Input arguments", although the problem should be well defined.
I appreciate any help I can get. The ODE is quite lenghty.
Regards,
Johannes
The complete error message is:
Not enough input arguments.
Error in
particle2ml>@(t,x,x_p,a)f(t,x,x_p,a,R(t),d0(t),d1(t),e,St,B,ck)
(line 24)
F = @(t, x, x_p, a) f(t,x,x_p, a,R(t), d0(t), d1(t),
e,St,B,ck)
Error in odearguments (line 90)
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1}
to yp0.
Error in ode15i (line 118)
odearguments(FcnHandlesUsed, solver_name, ode,
tspan, y0, ...
Error in particle2ml (line 30)
ode15i(F, [t0, 5], x0, x_p0)
function [x_v,t_v,x_pv]=particle2ml(St,e,S,B)
format long
%% ST=Stokes Number
%% e=epsilon (Elastic parameter)
%% S=Stefan Number
%% B=Beta (Knudsen Number)
ck=1/4;
syms x(t) x_p(t) a(t) R(t) d0(t) d1(t) e St B ck
eqs = [0== sqrt(R(t)*a^3)-9*pi*e*(36/B^2*R(t)^2*(x_p(t)+ck*diff(a(t),t))*(B-((x(t)+a(t)-d0(t))+B)*log(((x(t)+a(t)-d0(t))+B)/(x(t)+a(t)-d0(t)))) +4/B*(x_p+ck*diff(a(t),t))*R(t)*a(t)/(x(t)+a(t)-d0(t))*((x(t)+a(t)-d0(t))/B*log(((x(t)+a(t)-d0(t))+B)/(x(t)+a(t)-d0(t)))-1) -1/((x(t)+a(t)-d0(t))^2*((x(t)+a(t)-d0(t))+B))*(6*(x_p(t)+diff(a(t),t))*a^2*R(t)*(1-ck)^2) ),
0==diff(x(t),t)-x_p(t),
0==diff(x_p(t),t)+1/St*R(t)^2*(36/B^2*R(t)^2*(x_p(t)+ck*diff(a(t),t))*(B-((x(t)+a(t)-d0(t))+B)*log(((x(t)+a(t)-d0(t))+B)/(x(t)+a(t)-d0(t)))) +4/B*(x_p+ck*diff(a(t),t))*R(t)*a(t)/(x(t)+a(t)-d0(t))*((x(t)+a(t)-d0(t))/B*log(((x(t)+a(t)-d0(t))+B)/(x(t)+a(t)-d0(t)))-1) -1/((x(t)+a(t)-d0(t))^2*((x(t)+a(t)-d0(t))+B))*(6*(x_p(t)+diff(a(t),t))*a^2*R(t)*(1-ck)^2) )
];
vars = [x(t),x_p(t), a(t)];
f = daeFunction(eqs, vars, R(t), d0(t), d1(t), e, St, B, ck)
d0= @(t) 1,
d1= @(t) 1,
R=@(t) 1,
F = @(t, y, y_p) f(t,y,y_p,d0(t), d1(t), e,St,B)
t0 = 0;
x0 =[1,-1,0];
x_p0=[-1,0,0];
a0=0;
ode15i(F, [t0, 5], x0, x_p0)
end

2 件のコメント

Steven Lord
Steven Lord 2020 年 8 月 29 日
Can you show the full and exact text of the error message, including all the text displayed in red? If there are any warnings displayed in orange please include the text of those messages as well. The location information contained in the message may help isolate the source of the error more easily.
Johannes Conrad
Johannes Conrad 2020 年 8 月 29 日
Of course, I've added to my question. Thank you

サインインしてコメントする。

回答 (1 件)

Alan Stevens
Alan Stevens 2020 年 8 月 29 日

1 投票

I don't know if this is the issue, but in your first and thrid equations, as well as having x_p(t) you also have x_p (without the t).

1 件のコメント

Johannes Conrad
Johannes Conrad 2020 年 8 月 29 日
Thank you, I hadn't noticed that. But unfortunately it doesn't seem to be the issue

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

タグ

質問済み:

2020 年 8 月 29 日

編集済み:

2020 年 8 月 29 日

Community Treasure Hunt

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

Start Hunting!

Translated by