How to load ODE functions (ie. ODE1, ODE2) to call/reference?

I just watched a great video by Cleve Moler using ODE1, ODE2 (I am very new to Matlab). I tried to follow the code and his video (via command window); however, I get the error 'ODE1 not found'. I am not sure how to load this function? Thank you!!

5 Comments

I suspect that ODE1 and ODE2 are just the functions that Cleve Moler was providing as the first input to the ODE solver, in other words they were probably example function handles defined for that video. But as you did not give us a link to the video, this is just a guess.
Thanks, Stephen and Madhan! This is the video and here is the code (run directly in the command window as he did in his video).
https://www.mathworks.com/videos/solving-odes-in-matlab-1-euler-ode1-117526.html
>> F=@(t,y)-y
F =
@(t,y)-y
>> t0=0
t0 =
0
>> h=1
h =
1
>> tfinal=10
tfinal =
10
>> y0=0
y0 =0
0
>> ode1(F,t0,h,tfinal,y0) Undefined function or variable 'ode1'.
ode1 is a function which is defined
Hi Madhan, It does not seem to be in my version as I get the error message: "Undefined function or variable 'ode1'." I also searched the documentation for ode1, ode2, etc. and Matlab documentation/help did not produce any results. Is it possible I don't have access because of my version of Matlab (student)? Thank you.

Sign in to comment.

Answers (1)

On that video's page, right above the video transcript, there's a link "Related MATLAB code files can be downloaded from MATLAB Central". Did you download them? The ode1 and ode2 functions are part of that File Exchange submission.

Categories

Find more on Programming in Help Center and File Exchange

Products

Release

R2018a

Asked:

CT
on 19 Oct 2018

Answered:

on 19 Oct 2018

Community Treasure Hunt

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

Start Hunting!