HP Forums

Full Version: Store strings in Matrix
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.
(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.
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
Thanks for clarification.
Reference URL's