Why Does Matlab Say Undefined Function for cldesf in ode23?

  • Context: MATLAB 
  • Thread starter Thread starter sami23
  • Start date Start date
  • Tags Tags
    Matlab
Click For Summary
SUMMARY

The discussion addresses the issue of receiving an "Undefined function or method 'cldesf'" error when attempting to call the M-function 'cldesf' in Matlab 7.12.0 using the ode23 function. The error arises due to the function not being recognized, likely because it is not in the current working directory. Users are advised to ensure that the M-function is saved in the correct directory and that the path is set appropriately in Matlab.

PREREQUISITES
  • Familiarity with Matlab 7.12.0 environment
  • Understanding of M-functions in Matlab
  • Knowledge of using ode23 for solving ordinary differential equations
  • Basic skills in managing Matlab working directories and paths
NEXT STEPS
  • Verify the location of the M-function 'cldesf' and ensure it is in the current working directory
  • Learn how to set and change the Matlab path using the 'addpath' function
  • Explore the documentation for ode23 to understand its input requirements
  • Investigate common errors in Matlab related to function calls and how to troubleshoot them
USEFUL FOR

Matlab users, particularly those working with numerical methods and ordinary differential equations, as well as students and professionals troubleshooting function-related errors in Matlab.

sami23
Messages
69
Reaction score
1
I can't recreate a Matlab example on Matlab 7.12.0 that is straight from the book:

How do I call M-function cldesf?

This is the error I get:

>> [t,x]=ode23('cldesf',[t0,tf],x0t,[],A);
? Error using ==> feval
Undefined function or method 'cldesf' for input arguments of type 'double'.

Error in ==> odearguments at 98
f0 = feval(ode,t0,y0,args{:}); % ODE15I sets args{1} to yp0.

Error in ==> ode23 at 171
[neq, tspan, ntspan, next, t0, tfinal, tdir, y0, f0, odeArgs, odeFcn, ...
 

Attachments

Physics news on Phys.org
Check to make sure where you saved it is also your working directory
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
3K