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

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

[Octave-bug-tracker] [bug #65014] supplying a range to user defined func


From: Ken Snyder
Subject: [Octave-bug-tracker] [bug #65014] supplying a range to user defined func gives anomalous results
Date: Mon, 11 Dec 2023 22:15:36 -0500 (EST)

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

                 Summary: supplying a range to user defined func gives
anomalous results
                   Group: GNU Octave
               Submitter: paradigminversio
               Submitted: Tue 12 Dec 2023 03:15:34 AM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: paradigminversion
        Originator Email: 
             Open/Closed: Open
                 Release: 8.4.0
         Discussion Lock: Any
        Operating System: GNU/Linux
           Fixed Release: None
         Planned Release: None


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Tue 12 Dec 2023 03:15:34 AM UTC By: Ken Snyder <paradigminversio>
I've defined a function as follows:
function P = buck (T)
P =  (T/(25+T));
#P =  ( 257.14 + T );
endfunction

If I run the following:
octave:31> buck(0:100)

It produces a single result:
ans = 0.7104

If I invert the P assignments, thus:
#P =  (T/(25+T));
P =  ( 257.14 + T );
in the function and run the command:
octave:31> buck(0:100)
Then it gives:
ans =

 Columns 1 through 8:

   257.14   258.14   259.14   260.14   261.14   262.14   263.14   264.14
...
 Columns 97 through 101:

   353.14   354.14   355.14   356.14   357.14

email: kennethjsnyder@gmail.com








    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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