bugGNU Octave - Bugs: bug #65012, supplying a range of values gives...

 
 

bug #65012: supplying a range of values gives anomalous results in user defined function

Submitter:  None
Submitted:  Tue 12 Dec 2023 02:58:38 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Duplicate Assigned to:  None
Originator Name:  paradigminversion Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * 8.4.0
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Tue 12 Dec 2023 02:58:38 AM UTC, original submission:  

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


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-12-12 rik5 StatusNone Duplicate
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code