Why Does My Matlab Function Say Input Argument 'u' is Undefined?

  • Context: MATLAB 
  • Thread starter Thread starter shaqdiesel
  • Start date Start date
  • Tags Tags
    Beginner Matlab
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
1 reply · 2K views
shaqdiesel
Messages
1
Reaction score
0
need urgent help

I'm a beginner using matlab, I saw this function working:

function une=coloca(u)
num=1:256;
val=288-(u*3000);
une(1,:)=val;
une(2,:)=num;

but when I try to use it, this error appears:

? Input argument "u" is undefined.

Error in ==> une at 3
val=288-(u*3000);

What could be the problem? Could someone help me ?
 
Last edited:
Physics news on Phys.org


How do you call the function?