1. Other
  2. Other
  3. ive been working on a matlab assignment and nothing...

Question: ive been working on a matlab assignment and nothing...

Question details

I've been working on a matlab assignment , and nothing seems to be working due to my little knowledge about using such software. I'm looking for the right script as soon as possible for this kind of question. (Check the attached picture)MATLAB Assignment 4 Spring, 2017 Introduction to Linear Algebra (Week 5) 1. In this problem, we want to compute the determinant of an n x n matrix by a cofactor expansion without using the MATLAB command det. In order to do this, we need function file recursive function call ine, which has a well-defined list of inputs function begins with a finction definition and outputs. The syntax of the function definition line is as lollows: function output variables function-name (input variables) A recursive function has base cases where the function produces base results, and recursion for which the program calls itself. For example, the factorial function can be defined recursively with the base result 0! 1 and, for all n 0, n! n x (n -1)!. The function is defined as follows: function CNFacl myFactorial CN) if N- 0 NFac 1 else NFac N*my Factorial (N-1); end end Download the function file myDet m on KLMS. Considering the iterns loc low, complete the myDet.m to compute the determinant of a matrix A Use the command size to obtain the size of the matrix A Using the recursive function call, compute the dotorminant of mat rix A. For 2 x 2 matrix A (aj), the determinant is a11a22 a12021 You may use if statement and for loop In order to extract a submatrix of A, for example, when you compute Mij, use the syntax A( 1 i 1,i 1 n], [1 j 1, j 1 n On the command window of MATLAB, execute the function file myDet.m by typing myDet (A) For 3 -2 1 0 3 -2 1 4 find the de crminant of A using myDet. Chcck your answer with the result of MATLAB command det.

Solution by an expert tutor
Blurred Solution
This question has been solved
Subscribe to see this solution