Created
September 12, 2011 11:53
-
-
Save jeesay/1211097 to your computer and use it in GitHub Desktop.
square_wave.ijm
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
// Square Wave for ImageJ | |
// Jean-Christophe Taveau | |
// http://crazybiocomputing.blogspot.com | |
f=4; // default frequency | |
w=256; | |
h=256; | |
Dialog.create("Square Wave"); | |
Dialog.addNumber("Frequency",f); | |
Dialog.show(); | |
f=Dialog.getNumber(); | |
// M A I N | |
newImage("Square Wave", "32-bit Black", w, h, 1); | |
run("Macro...", "code=[v=sin((x+1)/w*"+f+"*2*PI) / abs(sin((x+1)/w*"+f+"*2*PI))]"); | |
exit(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment