Created
July 31, 2019 17:11
-
-
Save siddMahen/5084fda45ae101ae19c5ea12ea45ab6a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
m = 1 | |
n = 4*m + 1 | |
a(j) = (1/n)*(1 + sin((2*π*j*m + π*j)/n)/sin((π*j)/n)) | |
function b(j) | |
s = 2 | |
for k = 1:m | |
s += 2*cos((2*π*k*j)/n) | |
end | |
return s/n | |
end | |
println(a(1) - a(2) + a(3) - a(4) + a(5)) | |
println(b(1) - b(2) + b(3) - b(4) + b(5)) | |
for j = 1:n | |
println(a(j)) | |
println(b(j)) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment