plot_tensor

PURPOSE ^

PLOT_TENSOR - plot tensor components

SYNOPSIS ^

function plot_tensor(md,options_structure,width,i,type);

DESCRIPTION ^

PLOT_TENSOR - plot tensor components

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

   See also: PLOTMODEL

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function plot_tensor(md,options_structure,width,i,type);
0002 %PLOT_TENSOR - plot tensor components
0003 %
0004 %   Usage:
0005 %      plot_tensor(md,options_structure,width,i);
0006 %
0007 %   See also: PLOTMODEL
0008 
0009 h=subplot(width,width,i); axis off; pos=get(h,'Position');
0010 
0011 plot_options.offsetx=pos(1);
0012 plot_options.offsety=pos(2);
0013 plot_options.width=pos(3);
0014 plot_options.height=pos(4);
0015 
0016 %Figure out tensor type:
0017 if strcmpi(type(1:6),'strain'),
0018     tensor=md.strainrate;
0019 elseif strcmpi(type(1:6),'stress'),
0020     tensor=md.stress;
0021 elseif strcmpi(type(1:16),'deviatoricstress'),
0022     tensor=md.deviatoricstress;
0023 else
0024     error('plot_tensor error message: unsupported type of tensor');
0025 end
0026 
0027 %Figure out type of plot being requested
0028 if strcmpi(type(end-5:end),'tensor') | strcmpi(type,'strainrate') | strcmpi(type,'deviatoricstress') | strcmpi(type,'stress'),
0029     plot_tensor_components(md,options_structure,width,i,tensor,type,plot_options);
0030     return;
0031 elseif strcmpi(type(end-8:end),'principal'),
0032     plot_tensor_principal(md,options_structure,width,i,tensor,type,plot_options);
0033     return;
0034 elseif strcmpi(type(end-13:end-1),'principalaxis'),
0035     plot_tensor_principalaxis(md,options_structure,width,i,tensor,type,plot_options);
0036     return;
0037 else
0038     error('plot_tensor error message: unsurported type of plot');
0039 end

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