padarray using a for loop

1 visualizzazione (ultimi 30 giorni)
Fatima Daneshvar
Fatima Daneshvar il 22 Mag 2017
Risposto: Matthew Eicholtz il 22 Mag 2017
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?

Risposte (1)

Matthew Eicholtz
Matthew Eicholtz il 22 Mag 2017
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.

Categorie

Scopri di più su Statistics and Machine Learning Toolbox in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by