How I can take integration of sample data(y) in wave file i-e [y,Fs]=audioread('file.wav')?
2 次查看(过去 30 天)
显示 更早的评论
syms a t
[a,Fs_section]=audioread('wasif.wav');
info=audioinfo('wasif.wav');
t=0:seconds(1/Fs_section):seconds(info.Duration);
t=t(1:end-1);
figure(1);
subplot(2,1,1);
plot(t,a);
xlabel('Time');
ylabel('audio signal')
W=fft(a);
L_name=info.TotalSamples;
P2_name=abs(W/L_name);
P1_name=P2_name(1:L_name/2+1);
P1_name(2:end-1)=2*P1_name(2:end-1);
f_section=Fs_section*(0:(L_name/2))/L_name;
figure(1);
subplot(2,1,2);
plot(f_section,P1_name);
title('single sided amplitud spectrum of y(t)')
xlabel('f (hz)');
ylabel('|p1(f)|');
%sound(a,Fs_name);
amplitudes_name = abs(a); % abs(a) is the amplitudes in an all-positive sense
max_a = max(abs(a)); % max is the highest amplitude.
[lower,upper] = bandwidth(a);
peak_value_a=max_a(1,1) ; % first value
Kf_name=(2*pi*lower*5)/peak_value_a;
M=int(a,-inf,t); % i want to take the integration of a from -inf to t.
2 个评论
Image Analyst
2020-12-13
Why are a and t of type syms???
Also, you forgot to attach the audio file. Zip it up and attach it.
And why do you want to integrate an audio waveform? What does that mean?
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Denoising and Compression 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!