Created
March 8, 2017 00:41
-
-
Save FelipeCortez/346cfffe16db3b32ea7a2eb32c72039c to your computer and use it in GitHub Desktop.
Mary had a little lamb
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
rate = 8000 | |
freqs = [494 440 392 440 494 494 494] | |
x = 0:1/rate:3.5 | |
y = zeros(x) | |
range = 1:4001 | |
for i = 1:length(freqs) | |
y(range) = exp(-10 * x(range) + 5 * (i - 1)) .* sin(2 * %pi * freqs(i) * x(range)) | |
range = range + 4000 | |
end | |
clf() | |
plot2d3(x, y) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment