Graphics Programs Reference
In-Depth Information
Exercise 6 (Page 59)
You can generate a sinusoidal frequency variation by specifying a sinusoid
input to the voltage controlled oscillator function vco . Get the results of
specgram by using output arguments and compare a plot of the results
using an image and a surface plot:
Fs = 1000;
t = linspace(0,2*pi,8192);
x = sin(t);
y = vco(x,[0 500],Fs);
[z,freq,time] = specgram(y,[],Fs);
p = 20*log10(abs(z))
subplot(221)
imagesc(time,freq,p)
axis xy
colormap(flipud(gray))
colorbar
xlabel('Time, sec')
ylabel('Frequency, Hz')
subplot(223)
surfl(time,freq,p)
shading flat
xlabel('Time, sec')
ylabel('Frequency, Hz')
zlabel('Power, dB')
Search WWH ::




Custom Search