Datastore function can't find files

8 vues (au cours des 30 derniers jours)
Yuliano Moscoso Yarin
Yuliano Moscoso Yarin le 12 Oct 2019
Commenté : Walter Roberson le 26 Nov 2019
Hello there ,
I trying to run the datastore function on macOS but I'm getting this " Cannot find files or folders matching" error , the curious thing is the same code run without any problem on Windows 10.
  2 commentaires
Dushsyant K Rajamohan
Dushsyant K Rajamohan le 26 Nov 2019
Hey there,
I believe im trying to run the same code as yours,unfortunately the term 'variableNames" are not detected,may I know why and how can I solve it? Thank you
urgent.JPG
Walter Roberson
Walter Roberson le 26 Nov 2019
variableNames should be set to a cell array of character vectors that is the names of the variables you want to extract from the csv file. If the csv file has a header, the variable names correspond to the header elements. If the csv file has no header, then the variable names are Var followed by a column number.

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 12 Oct 2019
MacOS and Linux do not use \ as directory separators. You should be using fullfile()
files = fullfile(pwd, 'Data', [filenames '.csv']);
  1 commentaire
Yuliano Moscoso Yarin
Yuliano Moscoso Yarin le 13 Oct 2019
You're right, thank you.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by