how to call a string into a function

조회 수: 11 (최근 30일)
Ma.Cathyrine Ravina
Ma.Cathyrine Ravina 2019년 1월 4일
댓글: Ma.Cathyrine Ravina 2019년 1월 4일
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일
help str2func
help input

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Ordinary Differential Equations에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by