フィルターのクリア

how to create a vco with sine wave variation?

5 ビュー (過去 30 日間)
CAROL GARRITTY
CAROL GARRITTY 2017 年 9 月 18 日
編集済み: CAROL GARRITTY 2017 年 9 月 19 日
I was able to create a moving phase animation of a vco using spectrogram. Sort of like a strip chart? But I would like to create a sine wave variation instead of a sawtooth. Code snippet below. Figure 1 is a static display of a sawtooth variation. Figure 2 is a moving phase display based on Figure 1. Figure 3 is my workspace for a sine wave variation.
figure(1)
fs = 10e3;
t = 0:1/fs:2;
x = vco(sawtooth(7*pi*t,0.5),[0.1 0.4]*fs,fs);
spectrogram(x,kaiser(256,5),220,512,fs,'yaxis')
figure(2)
fs = 10e3;
for phase = 0:1:10;
t = 0:1/fs:2;
y = vco(sawtooth(7*pi*t+phase,0.5),[0.1 0.4]*fs,fs);
spectrogram(y,kaiser(256,5),220,512,fs,'yaxis');
disp(phase);
pause(0.1);
end
figure(3)
fs = 10e3;
for phase = 0:1:10;
for freq = 1:1:10
t = 0:1/fs:2;
z = sin(freq*1000*t+phase);
spectrogram(z,kaiser(256,5),220,512,fs,'yaxis');
disp(phase);
pause(0.1);
end
end

回答 (1 件)

CAROL GARRITTY
CAROL GARRITTY 2017 年 9 月 19 日
編集済み: CAROL GARRITTY 2017 年 9 月 19 日
I think I figured it out. I thought I tried this before, but I must have misspelled something.
figure(3)
fs = 10e3;
for phase = 0:1:10;
t = 0:1/fs:2;
z = vco(sin(5*pi*t+phase),[0.1 0.4]*fs,fs);
spectrogram(z,kaiser(256,5),220,512,fs,'yaxis');
disp(phase);
pause(0.1);
end

カテゴリ

Help Center および File ExchangeJust for fun についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by