bugGNU Octave - Bugs: bug #65014, supplying a range to user defined...

 
 

bug #65014: supplying a range to user defined func gives anomalous results

Submitter:  Ken Snyder <paradigminversio>
Submitted:  Tue 12 Dec 2023 03:15:34 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Invalid Assigned to:  None
Originator Name:  paradigminversion 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 03:20:19 AM UTC, comment #1: 

This is not a bug but expected behavior. See "help mrdivide".
If you need help / support in using octave post on
https://octave.discourse.group/

Sincerely,

Dmitri.
--

Dmitri A. Sergatskov <dasergatskov>
Tue 12 Dec 2023 03:15:34 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

email: -email is unavailable-

Ken Snyder <paradigminversio>

 

(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)
  • -email is unavailable- added by dasergatskov (Posted a comment)
  • -email is unavailable- added by paradigminversio (Submitted 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 Invalid
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-04b1.
    Corresponding source code