home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.soft-sys.matlab
- Path: sparky!uunet!cs.utexas.edu!torn!csd.unb.ca!dwoo
- From: dwoo@jupiter.sun.csd.unb.ca (Dennis Woo)
- Subject: Help! Plotting.
- Message-ID: <1993Jan24.233400.1494@jupiter.sun.csd.unb.ca>
- Organization: University of New Brunswick
- Date: Sun, 24 Jan 1993 23:34:00 GMT
- Lines: 31
-
-
- Hi Matlab expert,
-
- I am trying to make a contour plot of a hyperparaboloid of a
- two-variable function. The equation look like this:
-
- z = 2*w0^2 + 3*w1^2 - 12*w0 - 8*w1 + 2*w0*w1 + 36
-
- The minimum of z(w0,w1) is z(2.8,0.4)=17.6.
-
- 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).
-
- Could someone please let me know what I have done wrong.
-
- Thanx a lot.
-
- New Matlab user,
- *****************************************************************
- * Dennis Woo Department of Mechanical Engineering *
- * E-mail: dwoo@unb.ca University of New Brunswick *
- * Tel: (506) 453-4513 *
- *****************************************************************
-