Info

此问题已关闭。 请重新打开它进行编辑或回答。

strange cell array to matrix

1 次查看(过去 30 天)
venkat ta
venkat ta 2020-9-17
关闭: MATLAB Answer Bot 2021-8-20
[file,path]=uigetfile('*.csv','MultiSelect','on');
if ischar(file) % only 1 file selected
files={file};
end
File = fullfile(char(path),char(file));
I like normal x data and ydata in simple matrix form
[A1,delimiterOut,headerlinesOut] = importdata(File);

回答(1 个)

Mohammad Sami
Mohammad Sami 2020-9-18
编辑:Mohammad Sami 2020-9-18
Use the function readtable (or readmatrix) to load your file.
opts = delimitedTextImportOptions('NumVariables',2,'Delimiter',';','DataLines',5);
A1 = readtable(File,opts);
  2 个评论
venkat ta
venkat ta 2020-9-18
seems delimitedTextImportOptions function isnot available at R2018a!
Mohammad Sami
Mohammad Sami 2020-9-18
You can then replace it with detect import options function. https://www.mathworks.com/help/matlab/ref/detectimportoptions.html

此问题已关闭。

标签

产品


版本

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by