23.5k views
0 votes
"Create a Matlab Scrapt that will take the a Matrix A and Matrix B (of AX=B), then calculate the Determinant of Matrix A, Inverse of matrix A , Solution vector X, Rank of Matrix of A, Eigen Values and Eigen Vectors of A. You should use det, inverse, inverse(A)*B, rank, and eig functions of Matlab. YOU NEED TO USE LOOP TO TAKE INDIVIDUAL ENTRY OF MATRICES A and B!"

User Humble
by
3.3k points

1 Answer

7 votes

Answer:

see explaination

Step-by-step explanation:

function [] =

inverse(A,B)

da = det(A);

disp("The det of A is");

disp(da);

inva = inv(A);

disp("The inverse of A is");

disp(inva);

x = inva*B;

disp("The value of X is");

disp(x);

rk = rank(A);

disp("The rank of X is");

disp(rk);

Di = eig(A);

disp("The eigen values of A is");

disp(Di);

[V,Di] = eig(A);

disp("The eigen vectors of A are (Each column represents one column vector)");

disp(V);

end

A = [1,2;4,5];

B = [1,2;4,5];

inverse(A,B);

%ab = [num2str(t)," ",num2str(dx)," ",num2str(dy)];

%disp(ab);

User Eun Woo Song
by
3.3k points