Last active
August 29, 2015 14:27
Revisions
-
peppivankokki revised this gist
Aug 11, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ #checker board pattern used to centre the Fourier spectrum: checkerboard <- (-1)^(row(mat_clown) + col(mat_clown)) #modify matrix with checkerboard pattern: mat_checker <- mat_clown*checkerboard #Discrete fast Fourier transform: -
peppivankokki revised this gist
Aug 11, 2015 . No changes.There are no files selected for viewing
-
peppivankokki revised this gist
Aug 10, 2015 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ #checker board pattern used to center the fourier spectrum: checkerboard <- (-1)^(row(mat_clown) + col(mat_clown)) #modify matrix with checker board pattern: mat_checker <- mat_clown*checkerboard #Discrete fast Fourier transform: mat_fft <- fft(mat_checker) -
peppivankokki created this gist
Aug 10, 2015 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ #checker board pattern used to center the fourier spectrum: checker_board <- (-1)^(row(mat_clown) + col(mat_clown)) #modify matrix with checker board pattern: mat_checker <- mat_clown*checker_board #Discrete fast Fourier transform: mat_fft <- fft(mat_checker) #magnitude in frequency domain #Modulus = length of the vector of the complex number: magni <- Mod(mat_fft) #phase in the frequency domain #Argument = angle of the vector of the complex number: phase <- Arg(mat_fft) #Show magnitude in frequency domain (= spectrum): par(mar = c(0,0,0,0), oma = c(0,0,0,0)) image(1:nrow(magni), 1:ncol(magni), log(magni + 1), col = grey((0:255)/255))