Hey all,
I hope you are safe and healthy. I have a little problem with reading a NetCDF from another directory rather than the current folder.
I typed this:
load ('F:\MATLAB Behzad\Datasets and codes\GPCC\precip.mon.total.v2018.nc')
but it gave me this error:
Error using load
Unknown text on line number 1 of ASCII file F:\MATLAB
Behzad\Datasets and codes\GPCC\precip.mon.total.v2018.nc
"HDF
".
My NetCDF is successfully open when I change the current folder to the F:\MATLAB Behzad\Datasets and codes\GPCC.
Any help?
Thank you all

 채택된 답변

Walter Roberson
Walter Roberson 2020년 3월 16일

1 개 추천

You cannot load() a .nc file. You need to use something like ncread()

댓글 수: 1

Thank you. So:
cd 'F:\MATLAB Behzad\Datasets and codes\GPCC'
filename='precip.mon.total.v2018.nc'; %Name of netcdf file
then ncread.
Thanks again.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

제품

릴리스

R2018b

태그

질문:

BN
2020년 3월 16일

댓글:

BN
2020년 3월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by