Back to index

Functions | Variables
contour.m File Reference

Go to the source code of this file.


endif if (nargin==1||nargin==2) z = 10
endif if (is_matrix(z)) gset nosurface
 if (is_scalar(n)) command = sprintf ("gset cntrparam levels %d", n)
 elseif (is_vector(n)) tmp = sprintf ("%f", n(1))
endif eval (command)
 if (length(getenv("TEXMACS_PATH"))>0) P
 while (g==-1) sleep(1)
endwhile while (!feof(g)) f
 if (length(f)) P
endif endwhile fclose (g)
 disp (sprintf("%cverbatim:\n", 2))
 disp (setstr(P'))
 system ("rm /tmp/tmplot.eps")
endif else error ("contour: argument must be a matrix")
endif elseif (nargin==4) if(is_vector(x)&&is_vector(y)&&is_matrix(z)) xlen
 if (xlen==rows(z)&&ylen==columns(z)) if(rows(x) = 3 * xlen
 zz (:, i+1)
 error (msg)
endif else error ("contour: x and y must be vectors and z must be a matrix")
endif else usage ("contour (z, levels, x, y)")


function contour (x, y, z, n) if(length(getenv("TEXMACS_PATH"))>0) gset output '/tmp/tmplot.eps'
else n = y
gset cntrparam bspline
for i
endfor command = sprintf ("gset cntrparam levels discrete %s", tmp)
gset noparametric
gset view
gset gsplot z w l
 g = fopen("/tmp/tmplot.eps")
 P = [P
 ylen = length (y)
endif len = 3 * ylen
 zz = zeros (xlen, len)
 k = 1
endfor gset nosurface
gset parametric
endif else msg = "contour: rows (z) must be the same as length (x) and"

Function Documentation

disp ( sprintf("%cverbatim:\n", 2)  )
disp ( setstr(P')  )
elseif ( is_vector(n ) = sprintf ("%f", n(1))
endif elseif ( nargin  = =4)
endif else error ( "contour: argument must be a matrix )
error ( msg  )
endif else error ( "contour: x and y must be vectors and z must be a matrix )
endif endwhile fclose ( g  )
if ( nargin  = =1||nargin==2) = 10
endif if ( is_matrix(z)  )
if ( is_scalar(n ) = sprintf ("gset cntrparam levels %d", n)
if ( length(getenv("TEXMACS_PATH"))  ,
if ( length(f )
if ( xlen  = =rows(z)&&ylen==columns(z)) = 3 * xlen
system ( "rm /tmp/tmplot.eps"  )
endif else usage ( "contour (z, levels, x, y)"  )
while ( g  = =-1)
endwhile while ( feofg)
zz ( ,
i 1 

Variable Documentation

gset cntrparam bspline

Definition at line 55 of file contour.m.

endfor command = sprintf ("gset cntrparam levels discrete %s", tmp)

Definition at line 63 of file contour.m.

gset contour

Definition at line 54 of file contour.m.


Definition at line 79 of file contour.m.

g = fopen("/tmp/tmplot.eps")

Definition at line 71 of file contour.m.

for i
Initial value:
 2:length (n)
          tmp = sprintf ("%s, %f", tmp, n(i))

Definition at line 60 of file contour.m.

k = 1

Definition at line 102 of file contour.m.

gset gsplot zz w l

Definition at line 67 of file contour.m.

endif len = 3 * ylen

Definition at line 100 of file contour.m.

msg = "contour: rows (z) must be the same as length (x) and"

Definition at line 146 of file contour.m.

else n = y

Definition at line 50 of file contour.m.

Definition at line 66 of file contour.m.

endfor gset nosurface

Definition at line 109 of file contour.m.

P = [P

Definition at line 83 of file contour.m.

gset parametric

Definition at line 122 of file contour.m.

gset view

Definition at line 67 of file contour.m.

ylen = length (y)

Definition at line 95 of file contour.m.

zz = zeros (xlen, len)

Definition at line 101 of file contour.m.