Splitting matrix into arrays

조회 수: 19 (최근 30일)
Chase O'Melia
Chase O'Melia 2020년 5월 9일
댓글: Chase O'Melia 2020년 5월 9일
Hello,
how can I split a 2x1000 matrix into a 1x1000?

채택된 답변

Robin Kirsch
Robin Kirsch 2020년 5월 9일
I assume that you want to split a 2x1000 matrix into 2 1x1000 vectors.
A simple solution to do this is to extract each row, if A is your 2x1000 then you get the 1x1000 with
B = A(1,:) and C = A(2,:).
You can for-loop over this for x dimensional matrices
  댓글 수: 1
Chase O'Melia
Chase O'Melia 2020년 5월 9일
Exactly what I was looking for. Thanks!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by