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

  • Thread starter Thread starter shaqdiesel
  • Start date Start date
  • Tags Tags
    Beginner Matlab
AI Thread Summary
The user is encountering an error in MATLAB when trying to use a custom function named "coloca." The error message indicates that the input argument "u" is undefined, suggesting that the function is being called without providing the necessary argument. To resolve this issue, the user needs to ensure that they are correctly calling the function with a valid input value for "u." For example, the function should be called as "coloca(value)" where "value" is a numeric input. Clarifying the function call and ensuring the argument is defined should fix the error.
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?
 

Similar threads

Replies
8
Views
3K
Replies
4
Views
3K
Replies
6
Views
2K
Replies
1
Views
8K
Replies
5
Views
3K
Replies
2
Views
9K
Back
Top