Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
extrema / usr / share / extrema / Help / BasicTasks / BasicTasksS14.htm
Size: Mime:
<HTML>
<HEAD>
<TITLE>Display array data as contours and density plot</TITLE>
</HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000">

<P>
 Create a <code>32&times;32</code> array <code>Z</code>, where
 <code>Z(x,y) = exp(-((x/15)^2+(y/12)^2))</code> for <code>-5 &le; x &le; 26</code>
 and <code>-10 &le; y &le; 10</code>.
 Display as a contour plot and as density plots.</P>
<P>
 The following script will perform the desired operations:</P>
<P>
 <font color="blue"><pre>
 generate x -5,,26 32
 generate y -10,,10 32
 matrix z 32 32
 do j=[1:32]
   do k=[1:32]
     z[k,j] = exp(-((x[j]/15)^2+(y[k]/12)^2))
   enddo
 enddo
 window 5
 contour\legend x y z 20
 window 6
 set colormap thermal
 density x y z
 window 7
 density\diffusion x y z
 window 8
 density\dithering x y z
 </pre></font></P>
<P>
 <IMG SRC="BasicTasksS14I01.gif"></P>
<P>
 Read <code>32&times;24</code> elevation data from file <a href="BasicTasksS14D01.dat">e.dat</a>.<br />
 Display as a contour map and as density plots.</P>
<P>
 <font color="blue"><pre>
 read\matrix e.dat elevation 32 24
 window 5
 contour\legend elevation 15
 window 6
 set colormap topo256
 density elevation
 window 7
 set colormap gray256
 density elevation
 window 8
 density\diffusion elevation
 </pre></font></P>
<P>
 <IMG SRC="BasicTasksS14I02.gif"></P>
<P>
  <a href="BasicTasksS13.htm"><img src="../shadow_left.gif">&nbsp;
    <font size="+1" color="olive">Analyze data using FFT</font></a><br />
  <a href="BasicTasksS15.htm"><img src="../shadow_right.gif">&nbsp;
    <font size="+1" color="olive">Plot parametric functions</font></a></P>
</BODY>
</HTML>