vi

PURPOSE ^

VI - plot a field

SYNOPSIS ^

function vi(index,x,y,varargin)

DESCRIPTION ^

VI - plot a field

   This function plots a field of values mapped on a triangulation.
   Input: index,x,y,field,#of the window   
   This routine seems to be obsolete... move to Trash?

   Usage:
      vi(index,x,y,varargin)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function vi(index,x,y,varargin)
0002 %VI - plot a field
0003 %
0004 %   This function plots a field of values mapped on a triangulation.
0005 %   Input: index,x,y,field,#of the window
0006 %   This routine seems to be obsolete... move to Trash?
0007 %
0008 %   Usage:
0009 %      vi(index,x,y,varargin)
0010 
0011 num=varargin{nargin-3};
0012 figure(num),clf
0013 
0014 test=zeros(nargin-4,1);
0015 for n=1:nargin-4,
0016    test(n)=length(varargin{n});
0017 end
0018 
0019 m=ceil(sqrt(length(find(test~=2))))
0020 count=1;
0021 for n=1:nargin-4,
0022    if test(n)==2,
0023       caxis(varargin{n}),colorbar;
0024    else
0025       subplot(m,m,count)
0026       if length(varargin{n})==length(x),
0027          trisurf(index,x,y,varargin{n}),shading interp, view(2),colorbar
0028       else
0029          patch(x(index)',y(index)',[1; 1; 1]*varargin{n}'),shading interp,view(2),colorbar
0030       end
0031       
0032    xlim([min(x) max(x)]);
0033    ylim([min(y) max(y)]);
0034    hold on
0035    title(inputname(3+n))
0036    count=count+1;
0037    end
0038 end

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003