
Hp 48/49 List
Two questions.
1 How I make to create a matrix from two lists and a number?
Stack
3: {1,45 2,1 0,5 ...}
2: {105 130 50 ....}
1: 285
2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
If the list will be odd {2 4 7} the program informs to me that they
lack arguments.
Thank you!

Re: Hp 48/49 List
On Mar 8, 7:47 pm, fra...@uol.com.br wrote:[color=blue]
> Two questions.
> 1 How I make to create a matrix from two lists and a number?
> Stack
> 3: {1,45 2,1 0,5 ...}
> 2: {105 130 50 ....}
> 1: 285
>
> 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> If the list will be odd {2 4 7} the program informs to me that they
> lack arguments.
>
> Thank you![/color]
and I wish to know how to make gold out of iron
thank you!

Re: Hp 48/49 List
On Mar 8, 3:47*am, fra...@uol.com.br wrote:[color=blue]
> Two questions.
> 1 How I make to create a matrix from two lists and a number?
> Stack
> 3: * {1,45 2,1 0,5 ...}
> 2: * {105 130 50 ....}
> 1: * 285
>
> 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> If the list will be odd {2 4 7} the program informs to me that they
> lack arguments.
>
> Thank you![/color]
Could you provide more detail? I do not understand either of your
questions.
Regards,
TomCee

Re: Hp 48/49 List
On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:[color=blue]
> On Mar 8, 3:47 am, fra...@uol.com.br wrote:
>[color=green]
> > Two questions.
> > 1 How I make to create a matrix from two lists and a number?
> > Stack
> > 3: {1,45 2,1 0,5 ...}
> > 2: {105 130 50 ....}
> > 1: 285[/color]
>[color=green]
> > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > If the list will be odd {2 4 7} the program informs to me that they
> > lack arguments.[/color]
>[color=green]
> > Thank you![/color]
>
> Could you provide more detail? I do not understand either of your
> questions.
> Regards,
> TomCee[/color]
1 On my Stack:
Stack
Input
Output In Matrix format.
3: {1,45 2,1 0,5 ...} << a program to convert >>
1,45 2,1 0,5 ...
2: {105 130
50 ....}
105 130 50 ...
1:
285
285
2 I has a list on my stack. {1 3 2 3 7 9....}
I would like to check if a list is pair. I want to say. it has 2 or 4
or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
If it had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I am
informed of this..
Sorry.
My english it's poor.
Thank you so much.

Re: Hp 48/49 List
On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:[color=blue]
> On Mar 8, 3:47 am, fra...@uol.com.br wrote:
>[color=green]
> > Two questions.
> > 1 How I make to create a matrix from two lists and a number?
> > Stack
> > 3: {1,45 2,1 0,5 ...}
> > 2: {105 130 50 ....}
> > 1: 285[/color]
>[color=green]
> > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > If the list will be odd {2 4 7} the program informs to me that they
> > lack arguments.[/color]
>[color=green]
> > Thank you![/color]
>
> Could you provide more detail? I do not understand either of your
> questions.
> Regards,
> TomCee[/color]
1 On my Stack:
Stack
Input
3: {1,45 2,1 0,5 ...}
2: {105 130 50 ....}
1: 285
<< a program to convert >>
Output. In Matrix format.
1,45 2,1 0,5 ...
105 130 50 ...
285
2 I has a list on my stack. {1 3 2 3 7 9....}
I would like to check if a list is pair. I want to say. it has 2 or 4
or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
If the list had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I
am
informed of this..
Sorry.
My english it's poor.
Thank you so much.

Re: Hp 48/49 List
On Mar 8, 1:18 pm, fra...@uol.com.br wrote:[color=blue]
> On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:
>
>
>[color=green]
> > On Mar 8, 3:47 am, fra...@uol.com.br wrote:[/color]
>[color=green][color=darkred]
> > > Two questions.
> > > 1 How I make to create a matrix from two lists and a number?
> > > Stack
> > > 3: {1,45 2,1 0,5 ...}
> > > 2: {105 130 50 ....}
> > > 1: 285[/color][/color]
>[color=green][color=darkred]
> > > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > > If the list will be odd {2 4 7} the program informs to me that they
> > > lack arguments.[/color][/color]
>[color=green][color=darkred]
> > > Thank you![/color][/color]
>[color=green]
> > Could you provide more detail? I do not understand either of your
> > questions.
> > Regards,
> > TomCee[/color]
>
> 1 On my Stack:
> Stack
> Input
>
> 3: {1,45 2,1 0,5 ...}
> 2: {105 130 50 ....}
> 1: 285
>
> << a program to convert >>
>
> Output. In Matrix format.
> 1,45 2,1 0,5 ...
> 105 130 50 ...
> 285[/color]
Unless I am completely in the dark about something I believe that each
row and each column in a matrix must be of the same dimension, ie you
cannot have 2 rows with 3 or more numbers and then the third row with
only one number, so you could fill the remainder of the row with
zeros. Having said that and assuming your arguments in stack level 3
and 2 are also the same dimension you could try the following:
<< OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 ROW> ROT AXL 2
ROW+ SWAP 3 ROW+ >>
this will create:
[ [ 1.45 2.1 0.5 ]
[ 105. 130. 50. ]
[ 285. 0. 0. ] ]
Most likely there's a more elegant way of doing this but it gets the
job done.
[color=blue]
>
> 2 I has a list on my stack. {1 3 2 3 7 9....}
> I would like to check if a list is pair. I want to say. it has 2 or 4
> or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
> If the list had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I
> am
> informed of this..[/color]
Try the following:
<< DUP SIZE 2 / FP IF 0 =/ THEN "WHAT AN ODD LIST" MSGBOX END >>
Note: the =/ is supposed to signify the "not equal" symbol
[color=blue]
>
> Sorry.
> My english it's poor.
>
> Thank you so much.[/color]
I hope this was what you were trying to accomplish.
Jacob

Re: Hp 48/49 List
On 8 mar, 21:28, Jacob Wall <j8w1...@hotmail.com> wrote:[color=blue]
> On Mar 8, 1:18 pm, fra...@uol.com.br wrote:
>
>
>[color=green]
> > On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:[/color]
>[color=green][color=darkred]
> > > On Mar 8, 3:47 am, fra...@uol.com.br wrote:[/color][/color]
>[color=green][color=darkred]
> > > > Two questions.
> > > > 1 How I make to create a matrix from two lists and a number?
> > > > Stack
> > > > 3: {1,45 2,1 0,5 ...}
> > > > 2: {105 130 50 ....}
> > > > 1: 285[/color][/color]
>[color=green][color=darkred]
> > > > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > > > If the list will be odd {2 4 7} the program informs to me that they
> > > > lack arguments.[/color][/color]
>[color=green][color=darkred]
> > > > Thank you![/color][/color]
>[color=green][color=darkred]
> > > Could you provide more detail? I do not understand either of your
> > > questions.
> > > Regards,
> > > TomCee[/color][/color]
>[color=green]
> > 1 On my Stack:
> > Stack
> > Input[/color]
>[color=green]
> > 3: {1,45 2,1 0,5 ...}
> > 2: {105 130 50 ....}
> > 1: 285[/color]
>[color=green]
> > << a program to convert >>[/color]
>[color=green]
> > Output. In Matrix format.
> > 1,45 2,1 0,5 ...
> > 105 130 50 ...
> > 285[/color]
>
> Unless I am completely in the dark about something I believe that each
> row and each column in a matrix must be of the same dimension, ie you
> cannot have 2 rows with 3 or more numbers and then the third row with
> only one number, so you could fill the remainder of the row with
> zeros. Having said that and assuming your arguments in stack level 3
> and 2 are also the same dimension you could try the following:
>
> << OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 ROW> ROT AXL 2
> ROW+ SWAP 3 ROW+ >>
> this will create:
> [ [ 1.45 2.1 0.5 ]
> [ 105. 130. 50. ]
> [ 285. 0. 0. ] ]
> Most likely there's a more elegant way of doing this but it gets the
> job done.
>
>
>[color=green]
> > 2 I has a list on my stack. {1 3 2 3 7 9....}
> > I would like to check if a list is pair. I want to say. it has 2 or 4
> > or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
> > If the list had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I
> > am
> > informed of this..[/color]
>
> Try the following:
>
> << DUP SIZE 2 / FP IF 0 =/ THEN "WHAT AN ODD LIST" MSGBOX END >>
>
> Note: the =/ is supposed to signify the "not equal" symbol
>
>
>[color=green]
> > Sorry.
> > My english it's poor.[/color]
>[color=green]
> > Thank you so much.[/color]
>
> I hope this was what you were trying to accomplish.
>
> Jacob[/color]
<< DUP SIZE 2 / FP IF 0 =/ THEN "WHAT AN ODD LIST" MSGBOX END >>
Nice! This worked well.
<< OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 ROW> ROT AXL 2[color=blue]
> ROW+ SWAP 3 ROW+ >>[/color]
Good! This worked well too.
Initially, i had a problem. I use Hp48. It does not have this command
(NDUPN; AXL). I tried this to create the function NDUPN; AXL
[url]http://groups.google.com/group/comp.sys.hp48/browse_thread/thread/846809b3bb6268a6/b966a46c7ad0ad34?lnk=gst&q=Hp+48+AXL#b966a46c7ad0ad34[/url]
Now, it is all good.
Thank you so much.

Re: Hp 48/49 List
On 8 mar, 21:28, Jacob Wall <j8w1...@hotmail.com> wrote:[color=blue]
> On Mar 8, 1:18 pm, fra...@uol.com.br wrote:
>
>
>[color=green]
> > On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:[/color]
>[color=green][color=darkred]
> > > On Mar 8, 3:47 am, fra...@uol.com.br wrote:[/color][/color]
>[color=green][color=darkred]
> > > > Two questions.
> > > > 1 How I make to create a matrix from two lists and a number?
> > > > Stack
> > > > 3: {1,45 2,1 0,5 ...}
> > > > 2: {105 130 50 ....}
> > > > 1: 285[/color][/color]
>[color=green][color=darkred]
> > > > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > > > If the list will be odd {2 4 7} the program informs to me that they
> > > > lack arguments.[/color][/color]
>[color=green][color=darkred]
> > > > Thank you![/color][/color]
>[color=green][color=darkred]
> > > Could you provide more detail? I do not understand either of your
> > > questions.
> > > Regards,
> > > TomCee[/color][/color]
>[color=green]
> > 1 On my Stack:
> > Stack
> > Input[/color]
>[color=green]
> > 3: {1,45 2,1 0,5 ...}
> > 2: {105 130 50 ....}
> > 1: 285[/color]
>[color=green]
> > << a program to convert >>[/color]
>[color=green]
> > Output. In Matrix format.
> > 1,45 2,1 0,5 ...
> > 105 130 50 ...
> > 285[/color]
>
> Unless I am completely in the dark about something I believe that each
> row and each column in a matrix must be of the same dimension, ie you
> cannot have 2 rows with 3 or more numbers and then the third row with
> only one number, so you could fill the remainder of the row with
> zeros. Having said that and assuming your arguments in stack level 3
> and 2 are also the same dimension you could try the following:
>
> << OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 ROW> ROT AXL 2
> ROW+ SWAP 3 ROW+ >>
> this will create:
> [ [ 1.45 2.1 0.5 ]
> [ 105. 130. 50. ]
> [ 285. 0. 0. ] ]
> Most likely there's a more elegant way of doing this but it gets the
> job done.
>
>
>[color=green]
> > 2 I has a list on my stack. {1 3 2 3 7 9....}
> > I would like to check if a list is pair. I want to say. it has 2 or 4
> > or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
> > If the list had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I
> > am
> > informed of this..[/color]
>
> Try the following:
>
> << DUP SIZE 2 / FP IF 0 =/ THEN "WHAT AN ODD LIST" MSGBOX END >>
>
> Note: the =/ is supposed to signify the "not equal" symbol
>
>
>[color=green]
> > Sorry.
> > My english it's poor.[/color]
>[color=green]
> > Thank you so much.[/color]
>
> I hope this was what you were trying to accomplish.
>
> Jacob[/color]
Only more a point. Is possible a Matrix of 3 columns instead of 3
lines? This would facilitate the visualization!
Thanks..

Re: Hp 48/49 List
On 8 mar, 21:28, Jacob Wall <j8w1...@hotmail.com> wrote:[color=blue]
> On Mar 8, 1:18 pm, fra...@uol.com.br wrote:
>
>
>[color=green]
> > On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:[/color]
>[color=green][color=darkred]
> > > On Mar 8, 3:47 am, fra...@uol.com.br wrote:[/color][/color]
>[color=green][color=darkred]
> > > > Two questions.
> > > > 1 How I make to create a matrix from two lists and a number?
> > > > Stack
> > > > 3: {1,45 2,1 0,5 ...}
> > > > 2: {105 130 50 ....}
> > > > 1: 285[/color][/color]
>[color=green][color=darkred]
> > > > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > > > If the list will be odd {2 4 7} the program informs to me that they
> > > > lack arguments.[/color][/color]
>[color=green][color=darkred]
> > > > Thank you![/color][/color]
>[color=green][color=darkred]
> > > Could you provide more detail? I do not understand either of your
> > > questions.
> > > Regards,
> > > TomCee[/color][/color]
>[color=green]
> > 1 On my Stack:
> > Stack
> > Input[/color]
>[color=green]
> > 3: {1,45 2,1 0,5 ...}
> > 2: {105 130 50 ....}
> > 1: 285[/color]
>[color=green]
> > << a program to convert >>[/color]
>[color=green]
> > Output. In Matrix format.
> > 1,45 2,1 0,5 ...
> > 105 130 50 ...
> > 285[/color]
>
> Unless I am completely in the dark about something I believe that each
> row and each column in a matrix must be of the same dimension, ie you
> cannot have 2 rows with 3 or more numbers and then the third row with
> only one number, so you could fill the remainder of the row with
> zeros. Having said that and assuming your arguments in stack level 3
> and 2 are also the same dimension you could try the following:
>
> << OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 ROW> ROT AXL 2
> ROW+ SWAP 3 ROW+ >>
> this will create:
> [ [ 1.45 2.1 0.5 ]
> [ 105. 130. 50. ]
> [ 285. 0. 0. ] ]
> Most likely there's a more elegant way of doing this but it gets the
> job done.
>
>
>[color=green]
> > 2 I has a list on my stack. {1 3 2 3 7 9....}
> > I would like to check if a list is pair. I want to say. it has 2 or 4
> > or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
> > If the list had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I
> > am
> > informed of this..[/color]
>
> Try the following:
>
> << DUP SIZE 2 / FP IF 0 =/ THEN "WHAT AN ODD LIST" MSGBOX END >>
>
> Note: the =/ is supposed to signify the "not equal" symbol
>
>
>[color=green]
> > Sorry.
> > My english it's poor.[/color]
>[color=green]
> > Thank you so much.[/color]
>
> I hope this was what you were trying to accomplish.
>
> Jacob[/color]
Only more a point. Is possible a Matrix of 3 columns instead of 3
row? This would facilitate the visualization!
Thanks..

Re: Hp 48/49 List
On Mar 9, 10:10 am, fra...@uol.com.br wrote:[color=blue]
> On 8 mar, 21:28, Jacob Wall <j8w1...@hotmail.com> wrote:
>
>
>[color=green]
> > On Mar 8, 1:18 pm, fra...@uol.com.br wrote:[/color]
>[color=green][color=darkred]
> > > On 8 mar, 13:41, tomcee <tomcees_calcula...@yahoo.com> wrote:[/color][/color]
>[color=green][color=darkred]
> > > > On Mar 8, 3:47 am, fra...@uol.com.br wrote:[/color][/color]
>[color=green][color=darkred]
> > > > > Two questions.
> > > > > 1 How I make to create a matrix from two lists and a number?
> > > > > Stack
> > > > > 3: {1,45 2,1 0,5 ...}
> > > > > 2: {105 130 50 ....}
> > > > > 1: 285[/color][/color]
>[color=green][color=darkred]
> > > > > 2 How to check if a list is pair? I need that it is pair {1 3 4 6}.
> > > > > If the list will be odd {2 4 7} the program informs to me that they
> > > > > lack arguments.[/color][/color]
>[color=green][color=darkred]
> > > > > Thank you![/color][/color]
>[color=green][color=darkred]
> > > > Could you provide more detail? I do not understand either of your
> > > > questions.
> > > > Regards,
> > > > TomCee[/color][/color]
>[color=green][color=darkred]
> > > 1 On my Stack:
> > > Stack
> > > Input[/color][/color]
>[color=green][color=darkred]
> > > 3: {1,45 2,1 0,5 ...}
> > > 2: {105 130 50 ....}
> > > 1: 285[/color][/color]
>[color=green][color=darkred]
> > > << a program to convert >>[/color][/color]
>[color=green][color=darkred]
> > > Output. In Matrix format.
> > > 1,45 2,1 0,5 ...
> > > 105 130 50 ...
> > > 285[/color][/color]
>[color=green]
> > Unless I am completely in the dark about something I believe that each
> > row and each column in a matrix must be of the same dimension, ie you
> > cannot have 2 rows with 3 or more numbers and then the third row with
> > only one number, so you could fill the remainder of the row with
> > zeros. Having said that and assuming your arguments in stack level 3
> > and 2 are also the same dimension you could try the following:[/color]
>[color=green]
> > << OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 ROW> ROT AXL 2
> > ROW+ SWAP 3 ROW+ >>
> > this will create:
> > [ [ 1.45 2.1 0.5 ]
> > [ 105. 130. 50. ]
> > [ 285. 0. 0. ] ]
> > Most likely there's a more elegant way of doing this but it gets the
> > job done.[/color]
>[color=green][color=darkred]
> > > 2 I has a list on my stack. {1 3 2 3 7 9....}
> > > I would like to check if a list is pair. I want to say. it has 2 or 4
> > > or 6 or 8....numbers, { 1 2} or {1 2 3 4} or {1 2 3 4 5 6}. It's ok.
> > > If the list had 1 or 3 or 5...{1} or {2 4 1} or {1 6 8 2 1}...That I
> > > am
> > > informed of this..[/color][/color]
>[color=green]
> > Try the following:[/color]
>[color=green]
> > << DUP SIZE 2 / FP IF 0 =/ THEN "WHAT AN ODD LIST" MSGBOX END >>[/color]
>[color=green]
> > Note: the =/ is supposed to signify the "not equal" symbol[/color]
>[color=green][color=darkred]
> > > Sorry.
> > > My english it's poor.[/color][/color]
>[color=green][color=darkred]
> > > Thank you so much.[/color][/color]
>[color=green]
> > I hope this was what you were trying to accomplish.[/color]
>[color=green]
> > Jacob[/color]
>
> Only more a point. Is possible a Matrix of 3 columns instead of 3
> row? This would facilitate the visualization!
>
> Thanks..[/color]
Sure, just replace every instance of ROW with COL
<< OVER SIZE 1  0 SWAP NDUPN 1 + >LIST AXL ROT AXL 1 COL> ROT AXL 2
COL+ SWAP 3 COL+ >>