please help me in fix this error of Attempt to reference field of non-structure array.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Pooja Prajapati
am 27 Jan. 2017
Kommentiert: Claudio Stucki
am 27 Jan. 2017
my code is,
filename = 's5.wav';
au= audioread(filename);
y1=au.signal; % getting error in this line
fs=au.fs;
a=0.95;
y2 = filter([1, -a], 1, y1);
time=(1:length(y1))/fs;
au2=au;
au2.signal=y2;
audiowrite(au2, 's5_preEmphasis.wav');
1 Kommentar
Claudio Stucki
am 27 Jan. 2017
filename = 's5.wav';
[y1,fs]= audioread(filename);
a=0.95;
y2 = filter([1, -a], 1, y1);
time=(1:length(y1))/fs;
au2=y2;
audiowrite('s5_preEmphasis.wav',au2,fs );
Akzeptierte Antwort
Geoff Hayes
am 27 Jan. 2017
Pooja - see the documentation for this function at audioread. It returns the sampled data and sample rate as
[y1,Fs] = audioread(filename);
and not as a structure (like you are assuming with your code).
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Introduction to Installation and Licensing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!