Can not read in a cdf
이전 댓글 표시
I am rather new to MATLAB and I am trying to read in a cdf file. After downloading a patch, i entered "addpath 'C:\matlab-cdf_patch'" then tried to read in the cdf file with "data=cdfread('test.cdf')"... from there I get the errors:
Undefined function 'cdfinfoc' for input arguments of type 'char'.
Error in cdfinfo (line 165) tmp = cdfinfoc(filename);
Error in cdfread (line 216) info = cdfinfo(filename);
and do not know what they mean. Please help, thank you
답변 (1개)
Fangjun Jiang
2011년 10월 11일
Where did you download the patch? What version of MATLAB are you using? Can you try to run the following command to see if there is any error?
which example.cdf -all;
cdfinfo('example.cdf');
data=cdfread('example.cdf')
댓글 수: 2
Anthony
2011년 10월 12일
Fangjun Jiang
2011년 10월 12일
MATLAB provides a cdfread() function. I don't know why do you need to download a patch from NASA website. Remove your 'C:\matlab-cdf_patch' folder from your MATLAB path to see if you already have the cdfread() function by typing
which cdfread -all
The 'example.cdf' file is provided by MATLAB too. I was trying to tell you to go through that example to see if cdfread() can read it correctly. Here is a link to the document of cdfread(). http://www.mathworks.com/help/techdoc/ref/cdfread.html. It was available at least in R2007b. You can get that help by typing help cdfread.
카테고리
도움말 센터 및 File Exchange에서 CDF Files에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!