how to plot 3D data using NetCDF files ?

조회 수: 7 (최근 30일)
Mario Mohomes
Mario Mohomes 2021년 5월 28일
답변: KSSV 2021년 5월 28일
I'm trying to create a 3D plot in Matlab using a NetCDF file
I'm having a hard time starting
Matlab R2020a

답변 (1개)

KSSV
KSSV 2021년 5월 28일
Reading ncfile is very easy in MATLAB. You need to know only very few functions. Read about ncdisp, ncread.
ncfile = 'san_diego_bay_P020_2017.nc' ;
lon = ncread(ncfile,'lon') ;
lat = ncread(ncfile,'lat') ;
B = ncread(ncfile,'Band1') ;
pcolor(lon,lat,B')
shading interp
colorbar

카테고리

Help CenterFile Exchange에서 NetCDF에 대해 자세히 알아보기

태그

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by