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

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

[Octave-bug-tracker] [bug #56609] rand(n) accepts non-integral (n)


From: A.R. Burgers
Subject: [Octave-bug-tracker] [bug #56609] rand(n) accepts non-integral (n)
Date: Thu, 11 Jul 2019 02:36:55 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763

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

                 Summary: rand(n) accepts non-integral (n)
                 Project: GNU Octave
            Submitted by: arb
            Submitted on: Thu 11 Jul 2019 06:36:53 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Missed Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: Any

    _______________________________________________________

Details:

octave accepts rand(2.5), not eye(2.5). octave seems to do rand(round(n))


octave:11> version
ans = 5.1.1
octave:12> eye(2.5)
error: eye: conversion of 2.5 to int value failed
octave:12> rand(2.5)
ans =

   0.45678   0.59128   0.71431
   0.74580   0.18234   0.58583
   0.61076   0.82043   0.76781


matlab:


>> rand(2.5)
Error using rand
Size inputs must be integers.





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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