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

  • Context: MATLAB 
  • Thread starter Thread starter kreil
  • Start date Start date
  • Tags Tags
    Error Matlab
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
3 replies · 8K views
Messages
665
Reaction score
68
kreil submitted a new PF Insights post

5 Common MATLAB Error Messages and How to Fix Them

matlaberrors-80x80.png


Continue reading the Original PF Insights Post.
 
  • Like
Likes   Reactions: happyprimate, scottdave and Greg Bernhardt
Physics news on Phys.org
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