octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #30002] size error in contourf()


From: Petr Mikulik
Subject: [Octave-bug-tracker] [bug #30002] size error in contourf()
Date: Mon, 31 May 2010 08:23:55 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; cs-CZ; rv:1.9.2.3) Gecko/20100401 SUSE/3.6.3-1.2 Firefox/3.6.3

URL:
  <http://savannah.gnu.org/bugs/?30002>

                 Summary: size error in contourf()
                 Project: GNU Octave
            Submitted by: mikulik
            Submitted on: Mon 31 May 2010 08:23:55 AM GMT
                Category: Libraries
                Severity: 3 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: dev
        Operating System: GNU/Linux

    _______________________________________________________

Details:

The following code using contourf() fails in __contour__.m:
    x=1:10; y=1:20;
    [xx,yy]=meshgrid(x,y);
    z=xx.*xx+yy.*yy;
    contourf(z);

It works correctly with
   contourf(x,y,z);


I propose the following fix:

--- __contour__-orig.m  2010-05-31 09:46:26.000000000 +0200
+++ __contour__.m       2010-05-31 10:22:34.000000000 +0200
@@ -81,8 +81,8 @@

   if (length(varargin) < 5)
     z1 = varargin{3};
-    x1 = 1 : rows(z1);
-    y1 = 1 : columns(z1);
+    x1 = 1 : columns(z1);
+    y1 = 1 : rows(z1);
   else
     x1 = varargin{3};
     y1 = varargin{4};





    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?30002>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]