Unable to use 'readmatrix' function on Matlab R2022b on Ubuntu Linux
    조회 수: 8 (최근 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.
댓글 수: 0
답변 (1개)
  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
  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 Center 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

