How to solve error with data file
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Sohyeon Jeon
le 15 Oct 2018
Modifié(e) : Sohyeon Jeon
le 4 Juil 2020
Hello
I have a problem with the date files I've acquired from an audio-visual experiment.
audios = [0 1 2 1 2];
modes = [0 1 1 2 2];
DataFile = ls('a.mat','b.mat','c.mat','d.mat','sample.mat');
nRun = size(DataFile, 1);
I get error sign like this.
Error: AVtranslate_practice (line 11) S = load(deblank(DataFile(df,1:nRun)), 'gvals');
and that it cannot find the directory and files. Could you help me out on this problem?
Thanks!
1 commentaire
KSSV
le 15 Oct 2018
Check whether the file name created is existing in the current working directory.
Réponse acceptée
madhan ravi
le 15 Oct 2018
Modifié(e) : madhan ravi
le 15 Oct 2018
Read the below links to process sequence of files: https://www.mathworks.com/help/matlab/import_export/process-a-sequence-of-files.html
Make sure you denote the right format of the file
2 commentaires
Plus de réponses (1)
Image Analyst
le 17 Oct 2018
What does ls() return? A cell array? A number.
Try this:
filename = deblank(DataFile(df, 1 : nRun))
fprintf('filename = %s\n', filename);
if exist(filename, 'file')
message = sprintf('%s exists!', filename);
uiwait(helpdlg(message));
else
message = sprintf('%s does not exist!', filename);
uiwait(warndlg(message));
end
What do you observe?
0 commentaires
Voir également
Catégories
En savoir plus sur File Operations dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!