Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

strange cell array to matrix

2 vues (au cours des 30 derniers jours)
venkat ta
venkat ta le 17 Sep 2020
Clôturé : MATLAB Answer Bot le 20 Août 2021
[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);

Réponses (1)

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

Cette question est clôturée.

Tags

Produits


Version

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by