1 # -*-mode: tcl; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
3 # $Id: EOctave.tcl,v 1.3 2011-03-19 23:17:20 villate Exp $
5 ###### EOctave.tcl ######
6 ############################################################
7 # Netmath Copyright (C) 1998 William F. Schelter #
8 # For distribution under GNU public License. See COPYING. #
9 ############################################################
13 #-----------------------------------------------------------------
15 # insertResult_octave -- insert result RES, in text window W,
16 # into RESULTRANGE. The command which was sent to octave came
17 # from THISRANGE. For plots if a resultRANGE is missing,
18 # we use a space just after the end of the line of THISRANGE.
19 # checks if this is plotdata, and if so makes plot win for it.
23 # Side Effects: inserts in text or graph in window W.
25 #----------------------------------------------------------------
28 proc insertResult_octave
{ w thisRange resultRange res
} {
30 if { [regexp "\{plot\[23\]d" $res] ||
[regexp "\{plotdf" $res] \
31 ||
[regexp "\{scene" $res] } {
33 set name
[plotWindowName
$w [lindex $res 0]]
34 set tem
[setDesiredDims
$w $name $thisRange ]
35 eval plot2dData
$name $res [getDimensions
$w $name]
36 ShowPlotWindow
$w $name $thisRange $resultRange $tem
38 } elseif
{ "$resultRange" != "" } {
39 insertResult
$w $resultRange $res
45 ## endsource eoctave.tcl