Generate a 44 Pascal matrix then take its determinant and nd
Generate a 4×4 Pascal matrix, then take its determinant and nd its inverse.
i need octave or matlab code
Solution
A=pascal(4);
pascal4=A
determinant=det(A)
inverse=inv(A)
>> m14
pascal4 =
1 1 1 1
1 2 3 4
1 3 6 10
1 4 10 20
determinant =
1.0000
inverse =
4.0000 -6.0000 4.0000 -1.0000
-6.0000 14.0000 -11.0000 3.0000
4.0000 -11.0000 10.0000 -3.0000
-1.0000 3.0000 -3.0000 1.0000
>>
