Clear Filters
Clear Filters

variable dimension change nc file

14 views (last 30 days)
Tanmoyee Bhattacharya
Tanmoyee Bhattacharya on 28 Aug 2017
Commented: KSSV on 30 Aug 2017
I have downloaded era specific humidity data in .nc file.In that data specific humidity as a variable is present ant that is 4x3x4x9862 where 4=lon,3=lat,4=pressure level and 9862=time.Now I am creating a nc file where I want this in format 3x4x4x9862 where 3=lat,4=lon,4=pressure level and 9862=time. I have written a programme and create variable for nc file like that
nccreate('','q','Dimensions',{'lat' 3 'lon' 4 'lev' 4 'time' 9862 });
error Attempted to access q(3,4,4,9862); index out of bounds because
How can I solve the problem?
Tanmoyee Bhattacharya
Tanmoyee Bhattacharya on 29 Aug 2017
I have worked on matlab2015.ncwrite('','q',q(3,4,4,9862)); giving error message.
KSSV on 30 Aug 2017
In that case..write a matrix in loop.....write q(:,:,:,i) at a loop i.

Sign in to comment.

Answers (0)


Community Treasure Hunt

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

Start Hunting!