bugGNU Octave - Bugs: bug #48995, rand, rande (1.1)

 
 

bug #48995: rand, rande (1.1)

Submitted by:  Ernst Reissner <ernstreissner>
Submitted on:  Sat 03 Sep 2016 10:59:01 PM UTC  
 
Category: Octave FunctionSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: Works For MeAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 07 Sep 2016 08:22:06 AM UTC, comment #4:

ok.

Ernst Reissner <ernstreissner>
Tue 06 Sep 2016 10:57:27 PM UTC, comment #3:

That does not seem to be an error in Octave or Matlab.

For any function that accepts a size argument, the argument is allowed to be a floating point number, and the truncated integer part is used as the size value (number of elements, number of columns or rows, etc).

The rand and rande functions take no parameter, only size. But the randg and randp functions take both a parameter and a size.

The randg doc string seems to be wrong, since it doesn't document the required parameter. But the behavior is correct.

Mike Miller <mtmiller>
Project Administrator
Tue 06 Sep 2016 10:44:13 PM UTC, comment #2:

Ok sorry, I was in a hurry.
For example: rand(1.1) returns without an error
but if you read the docs 'help rand',
then a floating argument is not allowed.

Ernst Reissner <ernstreissner>
Tue 06 Sep 2016 09:29:29 PM UTC, comment #1:

Sorry, I don't understand what bug you are reporting here. Can you show an example of what function call with what arguments and what the error message is?

Mike Miller <mtmiller>
Project Administrator
Sat 03 Sep 2016 10:59:01 PM UTC, original submission:

whereas randg requires a real argument and so randg() does not work,
rand and rande cannot be applied to 1.1.

Should be possible applying 1 .

Ernst Reissner <ernstreissner>

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by ernstreissner (Submitted the item)
  • -unavailable- added by ernstreissner
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Sep 2016 10:57:27 PM UTCmtmillerOpen/ClosedOpen=>Closed
    Tue 06 Sep 2016 09:29:29 PM UTCmtmillerCategoryNone=>Octave Function
      StatusNone=>Works For Me
    Sat 03 Sep 2016 10:59:01 PM UTCernstreissnerCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1