File: _quiver3.sci

package info (click to toggle)
scilab-plotlib 0.41-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,196 kB
  • sloc: xml: 3,308; makefile: 15
file content (25 lines) | stat: -rw-r--r-- 443 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
function hdl=_quiver3(varargin)

[lhs,rhs]=argn(0);

if ~rhs
  [X,Y] = meshgrid(-2:0.25:2,-1:0.2:1);
  Z = X.* exp(-X.^2 - Y.^2);
  [U,V,W] = surfnorm(X,Y,Z);
  h=gcf();  
  IMD=h.immediate_drawing;
  h.immediate_drawing='off';  
  _surf(X,Y,Z);
  _hold on
  hdl=_quiver3(X,Y,Z,U,V,W,0.5);
  _hold off
  _axis equal
  legend 'Normals' 
   h.immediate_drawing=IMD;  
return
end

hdl=_mainPlot('quiver3',varargin);

// end of quiver
endfunction