readmatrix command not working

47 ビュー (過去 30 日間)
Brian
Brian 2021 年 8 月 16 日
コメント済み: Brian 2022 年 1 月 18 日
I am using Matlab R2021a on a linux server. I enter the exact example from matlab's documentation found here:
The example doesn't work.
>> type basic_matrix.txt
6,8,3,1
5,4,7,3
1,6,7,10
4,2,8,2
2,7,5,9
>> readmatrix('basic_matrix.txt')
Error using readmatrix (line 158)
Invalid default value for property 'VariableSelectors' in class 'matlab.io.xml.internal.parameter.SelectorProvider':
Not enough input arguments.
>> M= readmatrix('basic_matrix.xlsx')
Error using readmatrix (line 158)
Invalid default value for property 'VariableSelectors' in class 'matlab.io.xml.internal.parameter.SelectorProvider':
Not enough input arguments.

回答 (2 件)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021 年 8 月 16 日
Presumable that is happenign due to your OS - Linux.
You can try:
M=readtable('basic_matrix.txt');
M = table2array(M);
% You can also try:
T = readtable('basic_matrix.xlsx','Range','A1:D5','UseExcel',true); % Note the flag
How to assign the flag see doc.
  1 件のコメント
Brian
Brian 2022 年 1 月 18 日
readtable('basic_matrix.txt') does not work either. I get the identical error message.

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


Jeremy Hughes
Jeremy Hughes 2021 年 8 月 16 日
This looks like an installation issue to me. Something is missing/broken causing initialization error in the internal code.
Does this happen with a fresh install?
  1 件のコメント
Brian
Brian 2021 年 8 月 16 日
I will try. Thanks.

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

カテゴリ

Help Center および File ExchangeShifting and Sorting Matrices についてさらに検索

タグ

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by