3 % Plot given values on mesh
7 % Val : `2\times\nq`
double array
8 % CameraPosition : given value is [x y z]
9 % colormap :
set colormap value to \
'Jet\', \'HSV\', \'Gray\', \'colorcube\',\'Cool\',\'Spring\',\'Summer\',...
10 % shading : set shading interp at true or false
11 % colorbar : set colorbar visible at true or false
15 % Plotval(Th,u,'colormap
','Cool
');@endverbatim
16 % \image html images/PlotVal.png "figure : Plotval(Th,u,\'colormap\',\'Cool\');"
18 p.addRequired('Th
', @isstruct);
19 p.addRequired('Val
', @isnumeric);
21 p.addParamValue('CameraPosition
', [], @isnumeric );
22 p.addParamValue('colormap
', 'Jet
' , @isstr );
23 p.addParamValue('shading
', true , @islogical );
24 p.addParamValue('colorbar
', true , @islogical );
29 colormap(p.Results.colormap)
30 h=trisurf(Th.me',Th.q(1,:),Th.q(2,:),p.Results.Val);
31 xmin=min(Th.q(1,:));xmax=max(Th.q(1,:));
32 ymin=min(Th.q(2,:));ymax=max(Th.q(2,:));
39 if isempty(p.Results.CameraPosition)
40 set(gca,'CameraPosition',[(xmin+xmax)/2 (ymin+ymax)/2 10])
42 set(gca,'CameraPosition',p.Results.CameraPosition)