Matlab can't load .mat or .fits files from OneDrive

9 ビュー (過去 30 日間)
Saravanan Sengottuvel
Saravanan Sengottuvel 2021 年 4 月 1 日
コメント済み: Eva 2023 年 2 月 1 日
I have few data sets, say,
  1. fileA.mat (< 1 GB),
  2. fileB.mat (2 GB) and
  3. fileC.fits (3 GB).
I can load and read all the files inside MATLAB (R2020b-academic license) without any issues. However if the files are inside the microsoft OneDrive folder that are synced to the cloud, MATLAB is giving an error when I tried to load except the fileA.mat. 'Files on Demand' in onedrive is disabled and 'Always keep the file in this device' is enabled. Also, the copied file in the onedrive is not corrupted. Below are the error messages I get when loading,
Error when using FITS (fileC.fits):
>import matlab.io.*
>fptr = fits.openDiskFile(fitsfname, 'READONLY');
Error using fitsiolib
Unable to perform requested action. Filename contains unsupported characters.
Error in matlab.io.fits.openDiskFile (line 69)
fptr = fitsiolib('open_diskfile',filename,mode);
Error when using .mat (fileB.mat):
>filename = 'withI150mA.mat';
>load(filename);
Error using load
Unable to read MAT-file D:\OneDrive - Uniwersytet xxxxxxx\withI150mA.mat. Not a binary MAT-file. Try load -ASCII
to read as text.
Thanks in advance for the solutions.
  9 件のコメント
Sulaymon Eshkabilov
Sulaymon Eshkabilov 2023 年 1 月 15 日
Have you tried to change the directory to the path where you mat files are residing, e.g.:
cd(D:\OneDrive - Uniwersytet xxxxxxx\)
Eva
Eva 2023 年 2 月 1 日
same issue..MATLAB can't open files with OneDrive in the pathway...but I can't get rid of the OneDrive. Does anyone know how?

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeFile Operations についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by