Post Reply 
Store strings in Matrix
04-16-2021, 02:17 AM (This post was last modified: 04-16-2021 04:58 AM by photometer.)
Post: #1
Store strings in Matrix
Hello all,

I can do L0(1) := "Hello";
However, if I do M0(1,1) := "Hello"; it does not work.
I get an error "Bad argument type".

Can't Matrix be used to store strings?

My intention is to store the Names in first row and numbers in all other rows.
Find all posts by this user
Quote this message in a reply
04-16-2021, 02:42 AM
Post: #2
RE: Strore strings in Matrix
(04-16-2021 02:17 AM)photometer Wrote:  Hello all,

I can do L0(1) := "Hello";
However, if I do M0(1,1) := "Hello"; it does not work.
I get an error "Bad argument type".

Can't Matrix be used to store strings?

My intention is to store the Names in first row and numbers in all other rows.

Simple things like this can be easily found in the manual. On page 560, the first page that describes Matrices, it states:

"Matrices are two-dimensional arrays. They are composed of at least two rows and at least one column. Matrices may contain any combination of or real and complex numbers"

The Spreadsheet App may be better for what you are planning, that's described starting on page 222.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-16-2021, 05:32 AM
Post: #3
RE: Store strings in Matrix
Hello,

Matrices are mathematical objects which, in home mode, can only store reals or complex numbers.
This allows them to be optimized for speed of mathematics operations.

Lists are collections of objects, of any type.

Cyrille

Although I work for the HP calculator group, the views and opinions I post here are my own. I do not speak for HP.
Find all posts by this user
Quote this message in a reply
04-17-2021, 03:13 AM
Post: #4
RE: Store strings in Matrix
Thanks for clarification.
Find all posts by this user
Quote this message in a reply
Post Reply 




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