- [S,F,T] = spectrogram(...) returns a vector of frequencies, F, and a vector of times, T, at which the spectrogram is computed. F has length equal to the number of rows of S. T has length k (defined above) and the values in T correspond to the center of each segment.
How do I plot a 3-D graph of an audio signal that show whole signal amplitude VS time(s) VS frequency(hz)?
6 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi there!
I'm trying to plot a 3-D plot of my audio file that shows the Amplitude, Frequncy(Hz) and Time(s).Can this be done with surf function? What method is the easiest/shortest way to do the task? This is the code I'm using:
[input, fs] = wavread('address.wav');
L = length(input)./fs; % duration of the audio file in seconds
Ts = 1/fs; % sampling period
t= 0:Ts:L-Ts; % time vector
N= length(t); % length of time vector =15360
F= fs/N;
f= (-fs/2):F:(fs/2)-F; % frequncy vector
Thank You in advance!
0 commentaires
Réponses (1)
Star Strider
le 16 Août 2014
See the Signal Processing Toolbox spectrogram function. It can produce the data you need from your .wav file, and one of the 3D plotting functions (consider mesh, surf, ribbon) can do the plots.
From the spectrogram documentation:
0 commentaires
Voir également
Catégories
En savoir plus sur Simulation, Tuning, and Visualization 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!