Unable to use 'readmatrix' function on Matlab R2022b on Ubuntu Linux

10 次查看(过去 30 天)
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.

回答(1 个)

Brandon Stevens
Brandon Stevens 2022-11-10
编辑:Brandon Stevens 2022-11-14
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 个评论
Valerio Brunacci
Valerio Brunacci 2022-11-18
UPDATE: after io reinstall again MATLAB, i notice that at the startup in the command Window there are a lot of warnings:
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/matlab/helptools/docsearch_server
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/matlab/parquetio
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/matlab/appcontainer/appcontainer
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/matlab/parquetds
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/simulink/mask/iconeditor
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/simulink/vmgr/datamodel/web/UI
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/simulink/slhistory
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/simulink/vmgr/plugin/m
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/rtw/targets/common/can/blocks/tlc_c
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/visionhdl/visionhdlexamples
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/aeroblks/aeroblks/hmi
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/globaloptim/globaloptimdemos
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/ui/mw-webwindow/mw-webwindow-m
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/fuzzy/fuzdemos
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/optim/optimdemos
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/shared/cmlink/view/util/m
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/soc/shared/peripherals
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/robust/rctdemos
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/instrument/preferences
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/images/imdemos
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/symbolic/symbolicdemos
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/comparisons/mldesktop/action_ui/matlab
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/shared/slvnv
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/curvefit/sftoolgui
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/shared/testconsole
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/sl_dictionary/editor
Warning: Name is nonexistent or not a directory: /usr/local/MATLAB/R2022b/toolbox/sl_dictionary/core/api
Maybe is this the problem?
Brandon Stevens
Brandon Stevens 2022-11-21
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by