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

matlab question You have two Matrices, X and Y. Assume that they are the correct

ID: 3791706 • Letter: M

Question

matlab 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

2) add X+Y

sub X-Y

mul   X.*Y

div Y./X

cubed X.*X.*X;

3) script file is .m files containing varous type of matlab statements

whereas function has input parameter and output parameter