How can I correct this error "Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters"?

[t,y] = ode45((equfunc().m);(0,200);(1));
How to correct this ODE using a ODEsolver(ode45), so that I can run it properly and also, solve the ODE. After that, I can do the final step (plotting graphs)?

1 件のコメント

Please attach the equfunc.m file.
The syntax to call ode45 is incorrect, you can check out the correct syntax here - ode45

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

回答 (1 件)

Torsten
Torsten 2023 年 10 月 15 日
編集済み: Torsten 2023 年 10 月 15 日
Maybe
[t,y] = ode45(@equfunc,[0 200],1);
plot(t,y)
Look at the examples provided in the documentation of ode45:

カテゴリ

タグ

質問済み:

2023 年 10 月 15 日

コメント済み:

2023 年 10 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by