Unable to use 'readmatrix' function on Matlab R2022b on Ubuntu Linux
10 views (last 30 days)
Show older comments
Hi,
i wrote some code that in the first line read data from a csv and the process it.
I tested the code under window with Matlab R2022b and it's fine, it works as expected.
Using it on linux return this error:
% WITHOUT A PATH
>> readmatrix()
Error using readmatrix
Invalid default value for property 'Options' in class 'matlab.io.internal.functions.AcceptsImportOptions':
Error: File: ImportOptions.m Line: 731 Column: 20
Unable to find or import 'matlab.io.internal.common.display.cellArrayDisp'. Imported names must end with '.*' or be fully qualified.
% WITH A CORRECT PATH
path = strcat('src\Calibration\MagneticSesonsors\MagneticSensorsCSV\BigSensorsCSV\Calibration\MagneticAndUWB\WA0000',num2str(2),".CSV")
path =
"src\Calibration\MagneticSesonsors\MagneticSensorsCSV\BigSensorsCSV\Calibration\MagneticAndUWB\WA00002.CSV"
>> readmatrix(path);
Error using readmatrix
Invalid default value for property 'Options' in class 'matlab.io.internal.functions.AcceptsImportOptions':
Error: File: ImportOptions.m Line: 731 Column: 20
Unable to find or import 'matlab.io.internal.common.display.cellArrayDisp'. Imported names must end with '.*' or be fully qualified.
both with a correct string path argument that without it.
It is a problem of my installation? i've already update to the last release and already try to reinstall Matlab. Can anyone help me to understand and fix it?
NOTE: The .csv files are not open during the commands execution.
0 Comments
Answers (1)
Brandon Stevens
on 10 Nov 2022
Edited: Brandon Stevens
on 14 Nov 2022
Unfortauntely Valerio I haven't been able to reproduce this issue. I am able to use the readmatrix() function on a (.csv) file referenced by a path on a Linux OS (Ubuntu 20.04.5 LTS). So I think there may be an issue with how MATLAB is installed/setup.
Since you already re-installed MATLAB, I would try restoring your MATLAB path to the default. This can help uncover if there is a path issue, shadowing issue or possibly a corrupt installation. Note that running these commands will remove any custom paths you have made, so look at this other post for some information on how to back them up: https://www.mathworks.com/matlabcentral/answers/166871-how-will-running-the-restoredefaultpath-and-savepath-commands-affect-my-custom-paths-and-how-do
Try these in your MATLAB Command Window (after making a backup if you have a custom path!):
>>restoredefaultpath
>>rehash toolboxcache
>>savepath
If you are still experiencing issues, I'd then recommend contacting MathWorks Technical Support
2 Comments
Brandon Stevens
on 21 Nov 2022
I agree that this is indicating some issues with the installation of MATLAB. I would recommend reaching out to our support to take a look at how to resolve the installation issues you are experiencing.
https://www.mathworks.com/support/contact_us.html
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!