Trouble Saving Data Structure
12 次查看(过去 30 天)
显示 更早的评论
I am processing fluorescence data and saving data structures with subject IDs and other relevant trial identifiers as well as several long vectors of signal and time data. I have saved many versions of these structures without ever having encountered a problem. Today, while trying to save another structure, I keep getting errors that say matlab is "unable to write file 'C:\Users ..." and then messages will pop up in the command line saying "An error was encountered while saving the command history" and "The desktop configuration was not saved successfully". I have saved many of these types of structures before, and never had an issue. As far as I know, there is nothing unique to this specific structure that would be causing the problem, and I have since tested it with structures I have saved successfully in the past and gotten the same error. Does anyone know what I can do to successfully save my data?
3 个评论
Steven Lord
2025-4-4
Okay. Is there already a file in that specific location? If so, please specify that full path to the file in a call to the fileattrib function with two outputs, as I've done below for one of the MATLAB function files included in MATLAB.
b = fullfile(matlabroot, 'toolbox', 'matlab', 'funfun','ode45.m')
[~,values] = fileattrib(b)
Looking at this output, if I were to try to write to the ode45.m file it ought to fail, as the values struct shows that no one should have permissions to Write to that file. I want to see if your file is read-only as well.
If the file doesn't exist, call fileattrib on the directory in which you're trying to save the file, again to see if that directory is read-only.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Debugging and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!