Trying to call ode45 - Undefined function or variable

I wrote a function that will be integrated with the ode45 command. I'm having trouble with a variable in the function. I do not have the variable defined in the function, but it is defined in another script, where I'm trying to call ode45 on the function in that script, but it's saying that the variable is undefined. Anyone have any ideas how I could call ode45 on a function with a variable defined somewhere else?

답변 (2개)

Blah
Blah 2013년 5월 5일

0 개 추천

I just attempted to use a nested function, but it's introducing the same problem because my script also calls on variables from another script, so that if I put it into its own function, the variables in that script will be undefined.

카테고리

도움말 센터File Exchange에서 Programming에 대해 자세히 알아보기

질문:

2013년 5월 4일

Community Treasure Hunt

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

Start Hunting!

Translated by