How to import a matrix from a PC into the HP48?



Post: #7

I have some data on the PC as text file. I want to import the data into the HP48 (I have an SX and a GX as well as the emu48) in the form of a 2 column matrix so that I can run the regression on. What format the data must be in so that once transfered to the 48 it would recognize as a matrix?

Edited: 31 Aug 2006, 4:43 p.m. after one or more responses were posted


Post: #8

Quote:
I have some data on the PC as text file. I want to import the data into the HP48 (I have an SX and a GX as well as the emu48) in the form of a 2 column matrix so that I can run the progression on. What format the data must be in so that once transfered to the 48 it would recognized as a matrix?

Mostly every string in HP48 matrix format is accepted by Emu48.

Sample:

[ [ 1 2 ]
[3 4] ]

can be imported by Copy&Paste (Edit/Paste Stack) or with the Edit/Load Object... as string into stack Level 1. A simple OBJ-> on the calculator converts this into a Matrix object.

Christoph

Post: #9

Hello,

there is an Excel-AddIn for transfering data between an HP-48/49 and Microsoft Excel 97 and higher over at hpcalc.org (http://www.hpcalc.org/details.php?id=5166). I've tested it with a 49g and it works perfectly.

Hope that helps.

Regards

Karl

Post: #10

I exported a matrix from my 50g to the PC using Conn4x and this is the result:

%%HP: T(3)A(R)F(.);
[[ 1 2 ]
[ 3 4 ]]

So if you can create such a file from your data, you are fine.

Marcus


Post: #11

Quote:
I exported a matrix from my 50g to the PC using Conn4x and this is the result:

%%HP: T(3)A(R)F(.);
[[ 1 2 ]
[ 3 4 ]]

So if you can create such a file from your data, you are fine.


Note that if the data includes any "decimal point", for the ASCII
transfer header, use F(.) if the "fraction mark" is a period, or
F(,) if the fraction mark is a comma.

For that matter, if you omit the transfer header, then the
calculator will store the entire data stream as a character
string, which you could recall to the stack and "execute" with
STR\-> or OBJ-> to get the matrix.

For more information on transfer headers, search from
http://groups.google.com/group/comp.sys.hp48.

For the 49 series, numbers without decimal points are compiled as
"exact integers" if the calculator is in "exact" mode, or "real
numbers" if the calculator is in "approximate" mode.

But I do prefer Cristoph's suggestion of using Emu48 to work with
data that's available on the PC, rather than transferring it to a
physical calculator.

Regards,
James


Post: #12

Thanks everyone! I followed Christoph instructions and it worked fine.


Forum Jump: