Created
May 18, 2013 14:12
-
-
Save kurohuku/5604539 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Octaveでチャープ信号を書く | |
# E(t) = E0 cos(2πfct + at^2) | |
# t: 時間変化 | |
# E0: 振幅 | |
# fc: 中心周波数 | |
# a: チャープ定数 (a/π: チャープ率) | |
function fn = mkchirp(E0, fc, a) | |
fn = @(t) E0 * cos(2 * pi * fc * t + a * power(t, 2)); | |
endfunction; | |
x = 0:0.001:1; | |
y = mkchirp(1, 1, 100)(x); | |
plot(x, y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment