Scilab Function fec - pseudo-color plot of a function defined on a triangular mesh
Calling Sequence
- fec(x,y,triangles,func,[strf,leg,rect,nax,zminmax,colminmax])
Parameters
- x,y
: two vectors of size n, (x(i),y(i)) gives the coordinates of node i
- func
: a vector of size n : func(i) gives the value of the function for which we want the pseudo-color plot.
- triangles
: is a [Ntr,5] matrix. Each line of triangles specifies a triangle of the mesh triangle(j) = [number,node1,node2,node3,flag]. node1,node2,node3 are the number of the nodes which constitutes the triangle. number is the number of the triangle and flag is an integer not used in the fec function
- strf,leg,rect,nax
: see plot2d
- zminmax
: useful only for animation with fec, zminmax is a vector of size 2 [zmin zmax] which gives the z values associated with the first and the last color (of the current colormap). (More exactly if the colormap have nc colors and if we note dz = (zmax-zmin)/nc, then the part of the triangulation where zmin + (i-1)dz <= z < zmin + i dz is filled with the color i). By default zmin = min(func) and zmax = max(func). If you want to do an animation with func values that varie in time, take for zmin and zmax the global minimum and maximum or something close. CAUTION : for func values greather than zmax the last color is used and for func values less than zmin this is the first color (so you don't see that the zminmax levels are crossed).
- colminmax
: a vector of 2 positives integers colminmax=[colmin colmax] with 1 <= colmin < colmax <= nc (where nc is the number of colors of the current colormap). By default all the colors of the colormap are used but with colminmax you may choose a sub-part of the (current) colormap.
Description
See the demo files demos/fec.
fec.ex1 is a simple demo file in which a mesh and a function
on that mesh is completely built in Scilab syntax
fec.ex2 is an example for which the mesh and the function value where
computed by an external mesh builder (amdba type mesh) and an external program.
A set of macros ( provided in file macros.sci) can be used to read the
data files in Scilab and plot the results.
See Also