function y funab x a2b end Given the definition of funm lis
function y = fun(a,b) x- a2b; end Given the definition of fun.m listed above, what is the result of excuting the following statements? (Enter the response that MATLAB would give in the command window) >> z = fun(1,2) >> disp(x) ab Save
Solution
fun(1,2) is evaluated according to the definition provided and stored in z as(2-1)=1
x is evaluated as (1*1+2)=3
So the command line displays
1
3
Next The statements
1) >>plot(x,sin(x))
2)>>y=sin(x)
>>plot(x,y)
Produces plot of y=sin(x)
