How can I plot some fft data in a different way?
Mostra commenti meno recenti
Dear all,
I usual plot spectrograms plotting time vs. frequency vs. amplitude. I have collected some records through a microphone and each of the recordings are named usign a parameter, so called 'ϕ'. I would like to plot a single spectrogram similar to the one in the attached picture containing my data. File structure is 2 colums (time and amplitude) and 10000 rows.
Could you please help me making this "ϕ vs. frequency vs. amplitude" plot by using the two signal files attached?
I would sincerly appreciate it since I am litterally freaking out trying to fixing this issue.
4 Commenti
Yazan
il 21 Lug 2021
Define for us first the relation between time and ϕ. As you said, the spectrogram helps you plot the instantaneous spectra. To plot the instantaneous spectra as a function of ϕ, you need to define the relation between ϕ and time.
Francesco Pignatelli
il 22 Lug 2021
Francesco Pignatelli
il 22 Lug 2021
Modificato: Francesco Pignatelli
il 22 Lug 2021
Risposta accettata
Più risposte (1)
% Assume there are 3 spec (corresponding to phi)
nf = 20; nt=15; nspec = 3;
sp = randn(nf, nt, nspec);
% reshape the spectrogram to 2D
sp = reshape(sp, [nf, nt*nspec]);
% multiple spectrograms
imagesc(sp);
% annotation
h = gca;
h.XTick = 0.5+(0:nspec-1)*nt;
h.YTick = [];
grid on
phi = [1.2 3.4 5.6];
h.XTickLabel = string(phi);
xlabel('\phi')
1 Commento
Francesco Pignatelli
il 22 Lug 2021
Categorie
Scopri di più su Descriptive Statistics in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



