HP 50g - question about matrices arrays vectors etc.



#8

New to the forum.. I recently bought a 50g and have been learning how RPN and HP calculators in general work. I am getting more familiar with things but have a concept that I'm not understanding.

If anyone could point me to a webpage describing how matrices, vectors and arrays differ, and their notation on the calculator, it would be helpful. Or if it's simple enough to explain..

I think I'm getting confused with [brackets], (parenthesis), and also the commands. For example, how does having two numbers on the stack and then using ->V2 differ from having two numbers on the stack, then putting a 2 on the stack, then using ->ARRY ?

How does [2 5] differ from (2 5) ?

How does being in rectangular coordinates change the above in comparison to cylindrical?

That's kind of a lot, but any help is appreciated, Thanks.


#9

Hi Sean! Welcome to the forum.

Quote:
If anyone could point me to a webpage describing how matrices, vectors and arrays differ, and their notation on the calculator, it would be helpful. Or if it's simple enough to explain..

The printed Users Manual that comes with the calculator is hard to get through if you're a beginner. It's more like a "quick reference guide." I recommend instead the User's Guide on the CD. There is also a Quick Start Guide.
[/quote]
I think I'm getting confused with [brackets], (parenthesis), and also the commands. For example, how does having two numbers on the stack and then using ->V2 differ from having two numbers on the stack, then putting a 2 on the stack, then using ->ARRY ?
[/quote]
They produce the same result. ->V2 just saves a keystroke.
Quote:
How does [2 5] differ from (2 5) ?

These are different objects. [2 5] is an array while (2 5) is the complex number 2+5i. So for example, you can take the sine of (2 5) but not of [2 5].

Quote:
How does being in rectangular coordinates change the above in comparison to cylindrical?

It may change the way the numbers are displayed but it doesn't change their underlying value or the way that they are stored.

By the way, note that "2" and "2." are different on the calculator. "2" is an infinite-precision integer whereas "2." is floating point number.

Dave


#10

Thanks for the tips David.

->ARRY and ->V2 being equivalents makes me feel much less confused about things. With that being the case, is it correct to say that a two dimensional matrix is the same as an array with two vectors in it?

One other clarification, any numbers that are put into (parenthesis) are treated as complex on the calculator? To ask it another way, if I want to do some operations with complex numbers, it is actually as easy as tossing two numbers inside ( )?

Thanks again, I'll check out that user guide as well!


#11

There's also an Advanced User's Reference Manual. I can't get the Link feature to work, so you will need to cut and paste all of the following into your browser to see it. It is a pdf file, so you save it to your computer and view it with Adobe Reader:

http://h20565.www2.hp.com/portal/site/hpsc/template.BINARYPORTLET/public/kb/docDisplay/resource.process/?spf_p.tpst=kbDocDisplay_ws_BI&spf_p.rid_kbDocDisplay=docDisplayResURL&javax.portlet.begCacheTok=com.vignette.cachetoken&spf_p.rst_kbDocDisplay=wsrp-resourceState%3DdocId%253Demr_na-c02836298-1%257CdocLocale%253Den_US&javax.portlet.endCacheTok=com.vignette.cachetoken

Edited: 14 Nov 2013, 11:23 a.m.

#12

Hello Sean,

the sitiuation is a bit tricky:

matrices and vectors have internaly different types.

the command ->ARRY isn't equivalent to ->V2 or ->V3:

First of all:

->V2/3 only works with reals as arguments

->ARRY works with also with symbolic expression (single quoted: '3*A')

Second: If you want to produce a vector with ->ARRY you have to pass a single number for counting the elements of the vector as last argument to ->ARRY

example:

3.Stack:  -3
2.Stack: 1
1.Stack 2

Now proceed ->ARRY you get a 2-dimensional vector [-3 1].

If you use ->ARRY with a list with two elements for the dimension of the matrix as last argument, you get a matrix

example:

3.Stack:  -3
2.Stack: 1
1.Stack {1 2}

Now proceed ->ARRY you get a 1x2-Matrix [-3 1 ]. It is displayed with thicker brackets, but it looks very similar.

Greetings
peacecalc

#13

Also, in order to enter and use complex numbers the way you want it is necessary to set some flags correctly. Press Mode, then FLAGS and make sure that Flag 103 is checked (Complex on) and Flag 27 is unchecked ('X+Y*i' -> '(X,Y)'). You can then enter complex numbers as (X,Y) and get results in the same format. You can also perform operations on real numbers and get complex results, e.g. sqrt(-1) -> (0,1).

#14

Hello Sean,

For more information:

If you want to produce a vector with complex numbers you have to use ->ARRY, demonstrated like the first example written in the former post of mine.

Greetings
peacecalc


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime Matrices curiosity bluesun08 0 1,550 12-09-2013, 06:44 PM
Last Post: bluesun08
  HP-48GX & 50G Question Matt Agajanian 2 1,936 12-08-2013, 10:17 PM
Last Post: Matt Agajanian
  [HP-Prime CAS] "Warning, ^ (Command) Is ambiguous on non square matrices"?? CompSystems 1 2,250 12-07-2013, 07:15 PM
Last Post: CompSystems
  HP Prime: matrices in programs, in need of help Alberto Candel 9 3,384 11-26-2013, 01:33 AM
Last Post: cyrille de Brébisson
  HP Prime SIZE and OBJ-> with matrices/vectors/lists Helge Gabert 8 2,961 09-27-2013, 05:44 PM
Last Post: Helge Gabert
  HP 50g: question about bugs Miguel Toro 2 1,480 09-26-2013, 01:27 PM
Last Post: Miguel Toro
  Programming with Matrices Han 10 3,040 09-25-2013, 03:59 PM
Last Post: Han
  [HP-Prime xCAS] Arrays: Programming Commands (solution to the ambiguity) CompSystems 6 2,715 08-30-2013, 06:32 PM
Last Post: CompSystems
  [HP-prime] Parallel Processing, vectors, matrices as a only data type =( CompSystems 1 1,226 08-08-2013, 04:48 PM
Last Post: peacecalc
  Matrices on HP39gii (Cautionary Tale) Eddie W. Shore 2 1,385 03-23-2013, 07:54 PM
Last Post: Gilles Carpentier

Forum Jump: