padarray using a for loop

조회 수: 2 (최근 30일)
Fatima Daneshvar
Fatima Daneshvar 2017년 5월 22일
답변: Matthew Eicholtz 2017년 5월 22일
i have used this line "rc2fsktu(i,:)=padarray(rc2fsktu(i,:),[0 1],'symmetric','post')" and this error has been occured: Subscripted assignment dimension mismatch can someone help me?

답변 (1개)

Matthew Eicholtz
Matthew Eicholtz 2017년 5월 22일
I think the error is because you are trying to assign a padded row vector of length M to the pre-padded row vector of length N (N<M). If you are going to pad every row in the same manner, you can try:
rc2fsktu = padarray(rc2fsktu,[0 1],'symmetric','post');
Otherwise, I suggest storing the padded array in another variable name.

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by