How to inverse matrix 128*6 in matlab?
조회 수: 5 (최근 30일)
이전 댓글 표시
I want to inverse my matrices 128*6 into 6*128.
댓글 수: 0
채택된 답변
Highphi
2022년 2월 9일
u = [1, 1; ...
2, 2; ...
3, 3];
uInverse = flip(u)
u = [1, 1; ...
2, 2; ...
3, 3];
u90 = rot90(u)
u_neg90 = rot90(u, 3)
댓글 수: 1
DGM
2022년 2월 9일
편집: DGM
2022년 2월 9일
Using an asymmetric input allows some distinctions to be made. If the OP is trying to do linear algebra, transposition is probably what's intended.
u = [1, 4; ...
2, 5; ...
3, 6];
u_90 = rot90(u) % rotate 90
u_neg90 = rot90(u, 3) % rotate -90 (or 270)
u_tpose = u.' % transpose
Note that transposition is a special case of permutation that only applies to 2D arrays. More generally, you can do:
u_tpose = permute(u,[2 1])
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!