필터 지우기
필터 지우기

omment rearranger une matrce long en une seul ligne

조회 수: 1 (최근 30일)
alize beemiel
alize beemiel 2023년 11월 30일
댓글: alize beemiel 2023년 11월 30일
hello
i have a long matrix with over 1000 line and 2 column
exemple
A=[16 3
5 10
9 6
4 15
2 13
11 8
7 12
14 1]
and i want restrut my matrix like this
b=[ 16 3 5 10 9 6 4 15 2 13 11 8 7 12 14 1]
some help please

채택된 답변

Dyuman Joshi
Dyuman Joshi 2023년 11월 30일
A=[16 3
5 10
9 6
4 15
2 13
11 8
7 12
14 1];
B = reshape(A.', 1, [])
ans = 1×16
16 3 5 10 9 6 4 15 2 13 11 8 7 12 14 1

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by