Trouble using hdfread function with forward slash in data field name.
조회 수: 4 (최근 30일)
이전 댓글 표시
Hello,
I am having trouble with the code below.
LandMask = hdfread(MOD03, '/MODIS_Swath_Type_GEO/Data Fields/Land/SeaMask', 'Index', {[1 1],[1 1],[X Y]});
The problem is that the name of the data field is "Land/SeaMask" in other words, the forward slash is in the name itself. Matlab is trying to find "SeaMask" which does not exist.
Thanks.
댓글 수: 0
답변 (1개)
Walter Roberson
2015년 8월 17일
It is not possible to have a forward slash in a file name in any Unix-like operating system including OS-X and Linux. Forward slash is always the directory separator in such systems.
According to http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432386.aspx, in MS Windows, forward slash and backwards slash are equivalent in the operating system and always have been. Therefore you cannot have a forward slash in an MS Windows filename either.
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 HDF5에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!