Mathematica API Notes: Difference between revisions

From myWiki
Created page with "Save the following as input.m SetOptions[Plot,DisplayFunction->Identity] a=Plot[Cos[2*x],{x,0,Pi}] Export["plot.png",a] Exit[] The following can be run from the command line..."
 
No edit summary
 
Line 1: Line 1:
Save the following as input.m
Save the following as input.m


SetOptions[Plot,DisplayFunction->Identity]
SetOptions[Plot,DisplayFunction->Identity]
a=Plot[Cos[2*x],{x,0,Pi}]
a=Plot[Cos[2*x],{x,0,Pi}]
Export["plot.png",a]
Export["plot.png",a]
Exit[]
Exit[]


The following can be run from the command line in /opt/Wolfram/WolframEngine/10.0/Executables
The following can be run from the command line in /opt/Wolfram/WolframEngine/10.0/Executables


./math -run "<<input.m"
./math -run "<<input.m"

Latest revision as of 10:02, 8 April 2019

Save the following as input.m

SetOptions[Plot,DisplayFunction->Identity]
a=Plot[Cos[2*x],{x,0,Pi}]
Export["plot.png",a]
Exit[]

The following can be run from the command line in /opt/Wolfram/WolframEngine/10.0/Executables

./math -run "<<input.m"