How to split 2*2 matrix into individual elements

I want to know the command for splitting the 2*2 matrix into individual elements.

댓글 수: 1

Where M is your matrix:
TL = M(1,1);
TR = M(1,2);
BL = M(2,1);
BR = M(2,2);
Note that splitting data up usually makes the data harder to work with and the code less generalized.

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

답변 (1개)

Mehmed Saad
Mehmed Saad 2020년 4월 18일
x = rand(2,2);
x = num2cell(x);
[a,b,c,d] = deal(x{:})

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

질문:

2020년 4월 18일

답변:

2020년 4월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by