Azzera filtri
Azzera filtri

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

21 visualizzazioni (ultimi 30 giorni)
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

Risposte (1)

KSSV
KSSV il 6 Feb 2017
  1 Commento
Nuchaba Nureen
Nuchaba Nureen il 6 Feb 2017
Modificato: KSSV il 6 Feb 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.

Accedi per commentare.

Community Treasure Hunt

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

Start Hunting!

Translated by