Difficulty in sarrus method matlab

601 Views Asked by At

What is the matlab code for determining 3x3 matrix using sarrus method?

1

There are 1 best solutions below

2
On

You've got your matrix A. Then:

A(1,1)*A(2,2)*A(3,3) + A(1,2)*A(2,3)*A(3,1) + A(1,3)*A(2,1)*A(3,2) - A(3,1)*A(2,2)*A(1,3) - A(3,2)*A(2,3)*A(1,1) - A(3,3)*A(2,1)*A(1,2)

is the code to find the determinant of a $3$x$3$ matrix using Sarrus' rule.

Note: I recommend that you do some research before asking a question on this site, because this particular question could be easily solved by reading the Matlab documentation.