plot - Plotting 2D Hilbert Spectrum in MATLAB -
i want create 2d plot of hilbert spectrum. want time vs frequency plot, amplitude of signal represented color changes in plot.
what have done this, need this.
thank in advance
edit:
i have values of amplitude , instantaneous frequency on time, have produced using hilbert huang transform. let's use first imf, , have 100 samples. have is:
instantaneous_frequency = [f1 f2 f3 ... f100] instantaneous_amplitude = [a1 a2 a3 ... a100] time = [t1 t2 t3 ... t100]
what need way plot them second image, without using spectrogram function, since uses stft , have applied hht.
the code producing first plot is:
time_window = 1:101; signal= rand(1,101); hilb = hilbert(signal); inst_amp = abs(hilb); inst_th = angle(hilb); inst_freq = diff(a_inst_th)/(1/256)/(2*pi); %instantaneous frequency %inst_freq = remove_outliers(inst_freq,time_window(1:end-1)); inst_freq(end+1) = inst_freq(end); % done due diff() plot(time_window*4,inst_freq,'k.','markersize',5)
there matlab function produce spectrogram, looks lot want. see if solves problem.
Comments
Post a Comment