Unable to perform assignment because the size of the left side is

조회 수: 2(최근 30일)
Alex Devereaux
Alex Devereaux 2021년 5월 20일
댓글: Alex Devereaux 2021년 5월 21일
I am trying to pull rows from different matrices and add them to one matrix but I am not sure of the syntax to do this correctly.
What I have at the moment is as follows...
data1(1,:) = PAR1rs(1,:)
data1(2,:) = PAR3rs(1,:)
data1(3,:) = PAR4rs(1,:)
data1(4,:) = PAR5rs(1,:)
data1(5,:) = PAR6rs(1,:)
But it returns the following error...
Unable to perform assignment because the size of the left side is 1-by-61492 and
the size of the right side is 1-by-60522.

채택된 답변

Abdolkarim Mohammadi
Abdolkarim Mohammadi 2021년 5월 20일
The error is clearly saying that the size matrices do not match. data1 must be a 5x60522 matrix.
  댓글 수: 3

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

추가 답변(0개)

Community Treasure Hunt

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

Start Hunting!

Translated by