5 Common MATLAB Error Messages and How to Fix Them - Comments

  • Topic: MATLAB 
  • Thread starter kreil
  • Start date
  • Tags Tags
    Error Matlab
3 replies · 8K views · last reply
Science Advisor
Insights Author
Messages
665
Reaction score
68
kreil submitted a new PF Insights post

5 Common MATLAB Error Messages and How to Fix Them

Small blue and orange abstract graphic with white diagonal lines, likely a decorative banner for a Physics Forums Insights post.


Continue reading the Original PF Insights Post.
 
  • Like
Likes   Reactions: happyprimate, scottdave and Greg Bernhardt
FUN must be a function, a valid string expression, or an inline function object.
 
SivaChinna said:
FUN must be a function, a valid string expression, or an inline function object.

Good one! This message is returned by some functions that accept a function handle as an input if you don't specify it correctly.

(You might recall that function handles are the current standard, and they replaced inline function objects several years ago)

Here is an example of a way this message can arise using FMINSEARCH and how to fix it:

http://www.mathworks.com/matlabcentral/newsreader/view_thread/166230