This question is closed. Reopen it to edit or answer.
Not enough input argumaents
1 view (last 30 days)
madhan ravi on 9 Jul 2019
Edited: madhan ravi on 9 Jul 2019
https://in.mathworks.com/help/matlab/ref/function.html - I suggest you to read it for better understanding and further usage
x = 5; % example values
y = 2;
Result = Add(x,y)
% simply call it
function w = Add(x,y) % save the function in a separate file named as Add.m , note the name of the file should be same as the function name
disp(w); %% redundant
Note: Don't name variables which are in-built functions of MATLAB.