Data is not importing? SOS
Mostrar comentarios más antiguos
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')
Respuestas (1)
Star Strider
el 6 de Mayo de 2021
0 votos
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 comentarios
Karianne Kapfer
el 6 de Mayo de 2021
Star Strider
el 6 de Mayo de 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.
Categorías
Más información sobre Data Import and Analysis en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!