🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.soft-sys.matlab
Article #60

Re: Help! Plotting.

#60
From: Michael Maurer
Date: Mon, 25 Jan 1993 21:45
23 lines
1263 bytes
In <1993Jan24.233400.1494@jupiter.sun.csd.unb.ca> dwoo@jupiter.sun.csd.unb.ca (Dennis Woo) writes:

>I entered the following lines in matlab:
>	
>  [w0,w1]=meshdom(-5:.1:5,-5:.1:5);
>  z = 2*(w0.^2) + 3*(w1.^2) - 12*w0 - 8*w1 
>      + 2*(w0.*w1) + 36*ones(w0);
>  contour(z)

>Instead of contours (these contours are ellipses) centered at (2.8,0.4)
>with a z-value of 17.6,  I got the contours centered at around
>(85,60).

Your mistake is to omit the axes specifications to 'contour'.  Without
these, 'contour' will use the indices into the array 'z' as the x- and
y-axes.  Instead you should say

contour(z,-5:.1:5,-5:.1:5)

Good luck.
--
______________________________________________________________________
Michael Maurer          maurer@nova.stanford.edu        (415) 723-1024
Technical Details
Message-ID: <maurer.727998312@nova.Stanford.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!nntp.Stanford.EDU!forsythe.stanford.edu!nova!maurer
References: <1993Jan24.233400.1494@jupiter.sun.csd.unb.ca>

Show Full Headers
Complete Article Headers
Newsgroups: comp.soft-sys.matlab
Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!nntp.Stanford.EDU!forsythe.stanford.edu!nova!maurer
From: Michael Maurer <maurer@nova.stanford.edu>
Subject: Re: Help! Plotting.
Message-ID: <maurer.727998312@nova.Stanford.EDU>
Sender: news@leland.Stanford.EDU (Mr News)
Organization: STAR Lab, Stanford University, California USA
References: <1993Jan24.233400.1494@jupiter.sun.csd.unb.ca>
Date: 25 Jan 93 21:45:12 GMT
Lines: 23