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 =
11Code: Select all
function x = myfunny(a,b,c)
x = a^2 + 2*b + b*c;
endCode: Select all
>> myfunny(1,2,3)
ans =
11Code: Select all
% f = @(arglist)anonymous_functionCode: Select all
f = @(x) x^2 + 2*x;
f(2);Code: Select all
ans = 8