필터 지우기
필터 지우기

How can I find the determinant and transpose of a 13*13 matrix without writing all the numbers one by one?

조회 수: 2 (최근 30일)
13x13 matrix

답변 (3개)

madhan ravi
madhan ravi 2023년 11월 26일
doc det
doc transpose
  댓글 수: 2
Efe
Efe 2023년 11월 26일
I'm sorry, I asked the question incompletely. How can I write the matrix in a short way?
Walter Roberson
Walter Roberson 2023년 11월 26일
You could construct the matrix using sparse by listing the row numbers and column numbers and corresponding values. I count about 42 non-zero elements, so it would look like
sparse(list_of_42_rows, list_of_42_columns, list_of_42_values)
That would be 42*3 = 126 elements to enter instead of 13*13 = 169 -- but it would also be much easier to get wrong. TANSTAAFL

댓글을 달려면 로그인하십시오.


Torsten
Torsten 2023년 11월 26일
이동: Torsten 2023년 11월 26일
If a matrix is structured as irregularily as the one you posted, there is no other way as to reference its nonzero elements one by one:
A = zeros(13);
A(1,1) = 29/20;
A(1,2) = -1;
A(1,5) = -1/5;
...

John D'Errico
John D'Errico 2023년 11월 26일
You have many almost random looking numbers. So without knowing how they were generate, it is impossible to do better than stuffing the elements of your matrix using either the scheme @Torsten or @Walter Roberson has proposed.
HOWEVER, IF there is some formula that generates those numbers, then you need to write it in MATLAB code. And only you can write that code, since only you know how those coefficients were generated, and what the placement means. But surely there is SOME formula. We cannot guess it however.

카테고리

Help CenterFile Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by