Effacer les filtres
Effacer les filtres

Can I plot spectrogram with y-axis is frequency and x-axis is angle from goniometer related with the time?

21 vues (au cours des 30 derniers jours)
Hi Experts, I recorded 2 signals which are acceleration signal and angle from goniometer with same sampling rate. So, they have a same length. Then, I try to plot spectrogram which it provide frequency and time from acceleration signal. After that, I would like to change X-axis as time to be angle which I got from goniometer, Can I perform it?
Thanks

Réponses (1)

KSSV
KSSV le 6 Fév 2017
  1 commentaire
Nuchaba Nureen
Nuchaba Nureen le 6 Fév 2017
Modifié(e) : KSSV le 6 Fév 2017
I have read it and try with this way but it not work
Acc %%%Acceleration signal
Go %%%Goniometer signal
[y,f,t,p] = spectrogram( Acc,256,250,256,fs,'yaxis');
%%%Then,I try to plot it without using spectrogram command
figure;surf(f,t,10*log10(abs(p')),'EdgeColor','none');
axis xy; axis tight;colormap(jet); view(90,-90);
%%%Then,I try to change time to be angle with resample because t is changed from window calculating in spectrogram function
reGo=resample(Go,1670,10240);
figure;surf(f,reGo,10*log10(abs(p')),'EdgeColor','none');
axis xy; axis tight;colormap(jet); view(90,-90);
The two figures should be identical. But the results were two figures look different. Between the frequency and degree view over the spread than between the frequency and time.

Connectez-vous pour commenter.

Community Treasure Hunt

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

Start Hunting!

Translated by