Subscripted assignment dimension mismatch.

1 Ansicht (letzte 30 Tage)
min wong
min wong am 3 Okt. 2016
Kommentiert: min wong am 4 Okt. 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.

Akzeptierte Antwort

michael
michael am 3 Okt. 2016
Bearbeitet: michael am 3 Okt. 2016
Please do some initialization of the nc_sst
nc_sst=zeros(120,110,10)
Then it will work

Weitere Antworten (0)

Kategorien

Mehr zu Loops and Conditional Statements finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by