I am looking for a way to prevent a user from putting in too many inputs for a function. Here is a quick code example:
disp('Wrong Number of Arguements')
This function has 3 inputs: x, y, and z. If the user were to only define x and y, it would display "Wrong Number of Arguements" without issue. However, if the user added 4, 5, or any number over the 3 variables, MatLab tries to define the variable (which doesn't exist) and gives me an error.
Any help is appreciated, thanks!