Post Reply 
RANDMAT and RPN
04-11-2014, 07:14 AM (This post was last modified: 04-13-2014 04:11 PM by Bernd Grubert.)
Post: #1
RANDMAT and RPN
Hello,
I'm trying to create a matrix with RANDMAT in RPN mode. The arguments are e.g.

Code:

3: 'M0' 
2:   5
1:   2

When I execute RANDMAT I get the error messagebox RANDMAT(5,2). Obviously, the 'M0' on the stack is ignored.
Is this a bug or am I doing something wrong?

Regards
Bernd

BTW: The RANDMAT is only function where I have to specify a variable as target. This looks inconsistent to me compared to e.g. MAKEMAT or IDENMAT.

Edit: Subject.
Find all posts by this user
Quote this message in a reply
04-11-2014, 07:36 AM (This post was last modified: 04-11-2014 07:38 AM by Terje Vallestad.)
Post: #2
RE: RANDMAT and RPN (BUG?)
(04-11-2014 07:14 AM)Bernd Grubert Wrote:  Hello,
I'm trying to create a matrix with RANDMAT in RPN mode. The arguments are e.g.

Code:

3: 'M0' 
2:   5
1:   2

When I execute RANDMAT I get the error messagebox RANDMAT(5,2). Obviously, the 'M0' on the stack is ignored.
Is this a bug or am I doing something wrong?

Regards
Bernd

BTW: The RANDMAT is only function where I have to specify a variable as target. This looks inconsistent to me compared to e.g. MAKEMAT or IDENMAT.

You could try RANDMAT(3) as you are taking three elements off the stack. I understand that in RPN for most functions you must tell the calc how many objects should be consumed

Cheers, Terje

Edited formatting
Find all posts by this user
Quote this message in a reply
04-11-2014, 02:41 PM (This post was last modified: 04-11-2014 02:41 PM by Tim Wessman.)
Post: #3
RE: RANDMAT and RPN (BUG?)
Indeed.

Since RANDMAT can consume a variable number of arguments, specifying (3) will work. It isn't that "most" commands in RPN need a specifier, rather those can can consume a variable number of arguments need a specifier else they will default to the lowest number they can take.

TW

Although I work for HP, the views and opinions I post here are my own.
Find all posts by this user
Quote this message in a reply
04-13-2014, 04:09 PM
Post: #4
RE: RANDMAT and RPN (BUG?)
Hello,
Thanks Terje and Tim for the help.
I have overlooked this in the manual.
Regards
Bernd
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)