Reading and visualizing netcdf with vectors of differing lengths
2 views (last 30 days)
Show older comments
Commented: Louise Wilson on 23 Nov 2021
This is my first time reading netcdf data. I can read the file and variables of interest as follows:
Unfortunately I cannot attach the file because even in Zip format it is greater than 5mb.
>> whos vardata
Name Size Bytes Class Attributes
vardata 91x489x280 49838880 single
I'd like to be able to plot/visualize the data, but when I try to use plot3() it tells me the vectors must be the same length. Is there another way?
My goal is to find the freq value for a specific lat/lon, but in order to do make a selection of positions of interest, I need to look at the positions I have and see how they vary.
KSSV on 23 Nov 2021
Edited: KSSV on 23 Nov 2021
If you want to attach the file, you can upload in some cloud spaces (google drive) and share the link here without asking the login's credentials.
[p,m,n] = size(vardata) ;
for i = 1:p
If you want to extract a series from the (i,j) position
i = 3 ;
j = 4 ;
v = squeeze(vardata(:,j,i)) ;
More Answers (0)
Find more on NetCDF in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!