11.If the following code is executed in command window, what will be the result?
ID: 2074939 • Letter: 1
Question
11.If the following code is executed in command window, what will be the result? a ones(2,3); b a(2,3); size (b) a) 1 b) 0 d) error message 12.Use symbolic computation to Differentiate the following in MATLAB: +e"cosx) dxž syms x a) diff(x42+exp(2*x)*cos(x), x, 2) b) diff(x 2+exp(2x) cosx, x, 2) c) diff"2(*x^2+exp^(2%).cos(x),x, 2) d) diffx 2+exp(2"x)"cos(x), x, 2] 13. Given x-linspace(1,5,10) and y-linspace(1,20,10), evaluate xy+2(x/y) +5xy a) xy 3 2*(x/y) 5*xA3y 14. What command creates a 3x3 matrix with fives (5's) in the diagonal and O's elsewhere a) ones(3)+5 b) 5 eye(3) c) 5*[zeros(3)+ones(3)] d) diaglones(3,5)) 15. (4*1.25-5pts) using "subplot(m,n,p)" command create a figure window which will plot xsin(x) and cos(x), one above the other in the same figure window. The vector xE [-, ], has 100 elements. subplot( 2,1,1); plot )% plot xsinx 1st subplotplotLExplanation / Answer
answer
12) a
13) b
14) b
15) ...............................code....................
x=linspace(-pi,pi);
subplot(2,1,1);
plot(x,xsin(x));
subplot(2,1,2);
plot(x,cos(x));
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.