plot_mesh

PURPOSE ^

PLOT_MESH - plot model mesh

SYNOPSIS ^

function plot_mesh(md,options_structure,width,i);

DESCRIPTION ^

PLOT_MESH - plot model mesh

   Usage:
      plot_mesh(md,options_structure,width,i);

   See also: PLOTMODEL

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function plot_mesh(md,options_structure,width,i);
0002 %PLOT_MESH - plot model mesh
0003 %
0004 %   Usage:
0005 %      plot_mesh(md,options_structure,width,i);
0006 %
0007 %   See also: PLOTMODEL
0008 
0009 %process data and model
0010 [x y z elements is2d]=processmesh(md,options_structure);
0011 
0012 %plot mesh
0013 subplot(width,width,i); 
0014 
0015 %plot mesh
0016 if is2d
0017     A=elements(:,1); B=elements(:,2); C=elements(:,3); 
0018     patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
0019 else
0020     A=elements(:,1); B=elements(:,2); C=elements(:,3); D=elements(:,4); E=elements(:,5); F=elements(:,6);
0021     patch( 'Faces', [A B C], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
0022     patch( 'Faces', [D E F], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
0023     patch( 'Faces', [A B E D], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
0024     patch( 'Faces', [B E F C ], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
0025     patch( 'Faces', [C A D F ], 'Vertices', [x y z],'FaceVertexCData', [1 1 1],'FaceColor','none','EdgeColor','black');
0026 end
0027 
0028 %apply options
0029 if isnan(options_structure.title)
0030     options_structure.title='Mesh';
0031 end 
0032 if isnan(options_structure.colorbar)
0033     options_structure.colorbar=0;
0034 end
0035 applyoptions(md,[],options_structure);

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