I would like to know whether it is possible to customize the plot generated by MATLAB's spectrogram
function in such a way that its x-axis does not represent the time but another physical signal y2
captured simultaneously with the input signal y1
(used for computing the spectrogram). Therefore, it can be assumed that y1
and y2
have the same timestamps as x-axis as in the following example.
N = 1024;
n = 0:N-1;
w0 = 2*pi;
y1 = sin(w0*n);
y2 = n;
spectrogram(y1,'yaxis');