How to calculate inverse of 3d array matrices with size 3*3*18 ?

조회 수: 17 (최근 30일)
M
M 2022년 5월 17일
답변: Steven Lord 2022년 5월 17일
How to calculate inverse of 3d array matrices with size 3*3*18 ?

채택된 답변

KSSV
KSSV 2022년 5월 17일
A = rand(3,3,18) ;
[m,n,p] = size(A) ;
B = zeros(m,n,p) ;
for i = 1:p
B(:,:,i) = inv(A(:,:,i)) ;
end

추가 답변 (1개)

Steven Lord
Steven Lord 2022년 5월 17일
If you're using release R2022a or later you could use the pageinv function. But if you're planning to invert these matrices in order to multiply them by something else to solve a system of equations, I would advise you to use pagemldivide (also release R2022a) instead of using both pageinv and pagemtimes (release R2020b.)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by