Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to get Matlab read my char file in excel?

2 ビュー (過去 30 日間)
Matlaber
Matlaber 2019 年 4 月 10 日
閉鎖済み: Stephen23 2019 年 4 月 10 日
I have a list of char in my excel file.
Capture1.PNG
I want to import to my matlab like below:
Capture2.PNG
I had tried below
y=csvread('test10042019.csv');
x=dlmread('test10042019_char.csv');
But is not working
>> x=dlmread('test10042019_char.csv',' ', 1,0);
Error using dlmread (line 143)
Mismatch between file and format string.
Trouble reading 'Numeric' field from file (row number 1, field
number 1) ==> ,\n
THank you.
  1 件のコメント
Cris LaPierre
Cris LaPierre 2019 年 4 月 10 日
Why are you asking the same question multiple times? Once is sufficient.

回答 (1 件)

Alex Mcaulley
Alex Mcaulley 2019 年 4 月 10 日
Is this that you want?
[~,text,~] = xlsread(filename);
text = char(text);

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by