Subscripted assignment dimension mismatch.

2 vues (au cours des 30 derniers jours)
min wong
min wong le 3 Oct 2016
Commenté : min wong le 4 Oct 2016
maybe this is simple question , but i still can't figure out
My sst data array is 120*110,
I want to final array can be like this 120*110*10
for i=1:10
nc_sst(:,:,i)=sst;
end
error:Subscripted assignment dimension mismatch.

Réponse acceptée

michael
michael le 3 Oct 2016
Modifié(e) : michael le 3 Oct 2016
Please do some initialization of the nc_sst
nc_sst=zeros(120,110,10)
Then it will work
  1 commentaire
min wong
min wong le 4 Oct 2016
thank u
Thanks so much for your help.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by