Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

mat lab question You have two Matrices, X and Y. Assume that they are the correc

ID: 3119818 • Letter: M

Question

mat lab question

You have two Matrices, X and Y. Assume that they are the correct dimensions (i.e. Both rows and columns are equal). Write the MATLAB code to do the following. Add X and Y Subtract Y from X Multiply X and Y Divide Y by X A Cubed Scripts and functions (also known by their extension as m files) are ways of organizing code in units or modules. Use the links below to answer the following questions: MATLAB scripts and functions: MATLAB creating and running scripts What is the difference between a script and function?

Explanation / Answer

X = [ 7 5 6 ; 4 5 6; 7 8 9];
Y = [ 4 2 4 ; 2 0 8; 5 7 1];
a) A = X + Y

b) S= X - Y

c) M = X*Y

d) D= X.Y

e) E = X*X*X