Functions in MATLAB
Posted: Thu Sep 26, 2024 7:49 am
1. Create function file
2. Enter this in command window
Code: Select all
function x = myfunny(a,b,c)
x = a^2 + 2*b + b*c;
end2. Enter this in command window
Code: Select all
>> myfunny(1,2,3)
ans =
11