Advanced Plotting and Model Building - FET
Advanced Plotting and Model Building - FET
Advanced Plotting and Model Building - FET
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
The following session generates the contour plot<br />
of the function whose surface plot is shown in<br />
Figure 5.8–2; namely, z = xe -[(x-y2 ) 2 +y 2 ] ,<br />
for −2 ≤ x ≤ 2 <strong>and</strong> −2 ≤ y ≤ 2, with a spacing of<br />
0.01. This plot appears in Figure 5.8–3.<br />
>>[X,Y] = meshgrid(-2:0.1:2);<br />
>>Z = X.*exp(-((X- Y.^2).^2+Y.^2));<br />
>>contour(X,Y,Z),xlabel(’x’),ylabel(’y’)<br />
5-60<br />
Z.R.K