I am currently working on a GUI wherein you can input numbers then it will graph the answer. The function is a differential equation and im using ode45. How am i going to use the inputted number to the function?
For example:
function dxdt=rhs(t,x);
dxdt= 3*exp(-t);
end
I need the 3 there to be a user inputted number.
I will really appreciate it. Thank you so much :)

 採用された回答

madhan ravi
madhan ravi 2019 年 1 月 4 日

0 投票

help str2func
help input

1 件のコメント

Ma.Cathyrine Ravina
Ma.Cathyrine Ravina 2019 年 1 月 4 日
where should i put the str2func?

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

その他の回答 (0 件)

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by