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

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

[Octave-bug-tracker] [bug #60216] Delaunay example


From: Luca Nicolini
Subject: [Octave-bug-tracker] [bug #60216] Delaunay example
Date: Fri, 12 Mar 2021 11:12:52 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:86.0) Gecko/20100101 Firefox/86.0

URL:
  <https://savannah.gnu.org/bugs/?60216>

                 Summary: Delaunay example
                 Project: GNU Octave
            Submitted by: luca_nicolini
            Submitted on: Fri 12 Mar 2021 04:12:51 PM UTC
                Category: Documentation
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Documentation
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: 5.2.0
         Discussion Lock: Any
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

I found a little bug in the example of plotting Delaunay triangulation
provided in page 776 of the manual for version 5.2.0.
This is the example:

rand ("state", 2);
x = rand (10, 1);
y = rand (10, 1);
T = delaunay (x, y);
X = [ x(T(:,1)); x(T(:,2)); x(T(:,3)); x(T(:,1)) ];
Y = [ y(T(:,1)); y(T(:,2)); y(T(:,3)); y(T(:,1)) ];
axis ([0, 1, 0, 1]);
plot (X, Y, "b", x, y, "r*");

In this way, the arrays X and Y are column vectors whereas they should be
matrix of size [4x10]. The problem is easily fixed in this way:

X = [ x(T(:,1))'; x(T(:,2))'; x(T(:,3))'; x(T(:,1))' ];
Y = [ y(T(:,1))'; y(T(:,2))'; y(T(:,3))'; y(T(:,1))' ];





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?60216>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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