symmetricp SciMax Toolbox tab

SciMax Toolbox >> system

system

Maxima Function

Calling Sequence

system (command)

Description

Executes command as a separate process. The command is passed to the default shell for execution. system is not supported by all operating systems, but generally exists in Unix and Unix-like environments.

Supposing _hist.out is a list of frequencies which you wish to plot as a bar graph using xgraph.

(%i1) (with_stdout("_hist.out",
           for i:1 thru length(hist) do (
             print(i,hist[i]))),
       system("xgraph -bar -brw .7 -nl < _hist.out"));

In order to make the plot be done in the background (returning control to Maxima) and remove the temporary file after it is done do:

system("(xgraph -bar -brw .7 -nl < _hist.out;  rm -f _hist.out)&")
symmetricp SciMax Toolbox tab