Matrix problem with script

1 visualización (últimos 30 días)
donnie
donnie el 28 de Abr. de 2016
Respondida: Kevin el 29 de Abr. de 2016
Create a Matlab Script 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.
  1 comentario
Roger Stafford
Roger Stafford el 28 de Abr. de 2016
You really should make a good start on your problem before presenting it to this forum.

Iniciar sesión para comentar.

Respuestas (1)

Kevin
Kevin el 29 de Abr. de 2016
Actually this is why I would pay $2000 for MATLAB. Let see how easy it is in MATAB.
function s = swissarmyknife(A,B)
s = struct;
s.detA = det(A);
s.invA = inv(A); % Assume A is square and invertible.
s.x = A\B;
[s.V, s.D] = eig(A);
end

Categorías

Más información sobre Linear Algebra en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by