Data is not importing? SOS
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I am trying to import multiple .txt files and multiple .wav files so that I can later loop through them and create PDFs yet for some reason I cannot get it the data to import and none of the tutorials I have found so far are helpful to me becuase I am a beginner.
Does anyone know how to help?
Folder = "C:\Users\Karianne Kapfer\MATLAB\Final_Assignment\KillerWhales";
%%Where my data is
WavFileList = dir(fullfile(Folder, '*wav'));
TxtFileList = dir(fullfile(Folder, '*txt'));
%%Calling for it to pull these two types of files
%%Need it to import many files
T = importdata('.txt');
A = importdata('.wav')
0 commentaires
Réponses (1)
Star Strider
le 6 Mai 2021
Try that. It should do what you want.
I have no idea what the problem could be with the .txt files. It would likely be best to use readtable or readmatrix for them.
2 commentaires
Star Strider
le 6 Mai 2021
The question seems to omit several details, not the least of which is a reasonably detailed description of the problem, including all the red text of any errors the code throws, copied from the Command Window and pasted here.
Posting (attaching) one random example of each type of file could help determine at least part of what the problem is in importing (reading) them. If a specific .txt file matches a specific .wav file in some respect (i.e. both refer to the same whale), attach the matching files.
Voir également
Catégories
En savoir plus sur String Parsing 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!