1.

What is the function used to multiply a matrix, A, with itself n times?(a) mtimes(A,n)(b) ntimes(A,n)(c) mtimes(n,A)(d) mtimes(A^n)I have been asked this question during an interview for a job.Enquiry is from Vectors and Matrices in chapter MATLAB Basics of MATLAB

Answer»

Right answer is (a) mtimes(A,N)

To explain: The syntax of the function to multiply a MATRIX with itself n TIMES is ‘mtimes(A,n); where A is the matrix itself and n is the number of times the matrix need to be multiplied to itself. There are no function ntimes() in MATLAB and the rest of the options show incorrect syntax.



Discussion

No Comment Found

Related InterviewSolutions