フィルターのクリア

ncdataset error: Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special characters. > In ncdataset (line 89)

8 ビュー (過去 30 日間)
Ryan Oates
Ryan Oates 2018 年 5 月 25 日
コメント済み: Ryan Oates 2018 年 5 月 27 日
Hi All,
Trying to use NCTOOLBOX and after downloading a file I try to open it with ncdataset in the following code:
tmpdata = ncdataset('C:\User\MATLAB\Temporary\tmpfile');
The error I get seems to to be related to sprintf that shows up (below). I am using Windows 10 and Java 1.8. I've seen other people have sprintf issues in Windows 10 as well but not the errors like this within ncdataset. Any ideas??
Any thoughts on how to resolve would be greatly appreciated.
Warning: Escaped character '\U' is not valid. See 'doc sprintf' for supported special
characters.
> In ncdataset (line 89)
In GDAS_grab (line 117)
Error using ncdataset (line 91)
Failed to open C:
Error in GDAS_grab (line 117)
tmpdata = ncdataset(outfilename);
Caused by:
Error using ncdataset (line 75)
Java exception occurred:
java.io.IOException: java.lang.RuntimeException: java.lang.NoClassDefFoundError:
ucar/nc2/util/CloseableIterator
at ucar.nc2.NetcdfFile.open(NetcdfFile.java:425)
at ucar.nc2.dataset.NetcdfDataset.openOrAcquireFile(NetcdfDataset.java:699)
at ucar.nc2.dataset.NetcdfDataset.openDataset(NetcdfDataset.java:421)

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 5 月 25 日
You need to pass a URL to ncdataset(). That includes <file://> prefix for local files, and requires that you use / as the directory separator.
The code probably has a small error in how it uses what is passed to it, but you are passing the wrong thing to it.
  1 件のコメント
Ryan Oates
Ryan Oates 2018 年 5 月 27 日
Thanks Walter. I guess what is confusing is this exact code on an older machine and MATLAB license (2014) works perfectly well. Hmmm..

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCall Web Services from MATLAB Using HTTP についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by