Subscripted assignment dimension mismatch.

3 visualizaciones (últimos 30 días)
min wong
min wong el 3 de Oct. de 2016
Comentada: min wong el 4 de Oct. de 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.

Respuesta aceptada

michael
michael el 3 de Oct. de 2016
Editada: michael el 3 de Oct. de 2016
Please do some initialization of the nc_sst
nc_sst=zeros(120,110,10)
Then it will work

Más respuestas (0)

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by