Subscripted assignment dimension mismatch.

1 view (last 30 days)
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.

Accepted Answer

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

More Answers (0)

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!