Data is not importing? SOS

3 Ansichten (letzte 30 Tage)
Karianne Kapfer
Karianne Kapfer am 6 Mai 2021
Kommentiert: Star Strider am 6 Mai 2021
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')

Antworten (1)

Star Strider
Star Strider am 6 Mai 2021
It is not importing because the correct approach to reading .wav files is to use audioread.
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 Kommentare
Karianne Kapfer
Karianne Kapfer am 6 Mai 2021
Neither of those solutions worked, I am still getting errors, but thank you for trying :)
Star Strider
Star Strider am 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.
If the problem is processing files, see Process a Sequence of Files .
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by