random.m fails

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

random.m fails

Michel
Hello,

>> N     = 1e3;
>> mu    = 5;
>> sigma = 10;
>> X     = random('Normal',mu,sigma,N,1);
error: 'normrnd' undefined near line 155 column 16
error: called from
    random at line 155 column 14
>> X     = random('Normal',mu,sigma,N);
error: 'normrnd' undefined near line 155 column 16
error: called from
    random at line 155 column 14
>> X     = random('normal',mu,sigma,N);
error: 'normrnd' undefined near line 155 column 16
error: called from
    random at line 155 column 14
>> X     = random('uniform',mu,sigma,N);
error: 'unifrnd' undefined near line 163 column 16
error: called from
    random at line 163 column 14

>> help normrnd
error: help: 'normrnd' not found

'random' is a function from the file
C:\Octave\OCTAVE~1.0\share\octave\packages\statistics-1.3.0\random.m

In the help, example is:R = random("normal", 5, 2, [10, 20]);

This is the same:
error: 'normrnd' undefined near line 155 column 16
error: called from
    random at line 155 column 14

in paths,
C:\Octave\OCTAVE~1.0\share\octave\packages\statistics-1.3.0

Do you have any idea why random.m fails?

Regards,

Michel



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

Re: random.m fails

Mike Miller-4
On Thu, Jul 12, 2018 at 09:27:58 -0700, Michel wrote:
> >> X     = random('Normal',mu,sigma,N,1);
> error: 'normrnd' undefined near line 155 column 16
> error: called from
>     random at line 155 column 14
[…]
> C:\Octave\OCTAVE~1.0\share\octave\packages\statistics-1.3.0
>
> Do you have any idea why random.m fails?

You should try updating the statistics package to version 1.4.0.

    pkg install -forge statistics

--
mike

signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: random.m fails

Michel
Hello Super Mike

 That works.

Thank you Mike

regards,

Michel



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-Maintainers-f1638794.html

Reply | Threaded
Open this post in threaded view
|

[Solved] random.m fails

Michel