table data
|
02-22-2019, 07:33 PM
(This post was last modified: 04-25-2019 02:49 AM by compsystems.)
Post: #3
|
|||
|
|||
RE: table() data
Hello,
Delete the space between set and the bracket [] set [] => set[], same for polynomial poly1[], I do not know why the hpprime, when pasting the data adds a space before [] ################## Converting a rectangular array type matrix into a table the positions start at (0,0) Example PHP Code: MA:=[[9,8], table(MA) [enter] returns PHP Code: table( for the inverse process, that is, convert a table to a matrix, Note that this must have the form PHP Code: table( or PHP Code: table( Example PHP Code: matrix( ) or PHP Code: matrix( PHP Code: [[9,8], ///////////////////////// An alternative way to define tables is using ( : ) PHP Code: d := table( "foo": 10, 9:x+y*i, "bar": 100, "baz": 1000) [enter] returns But unlike python, Xcas reorders the labels numerically and alphabetically To extract the tag you can use FOR PHP Code: for k in d: and to access the values of the label. PHP Code: for k in d: |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
table data - compsystems - 02-22-2019, 12:23 AM
RE: table() data - toml_12953 - 02-22-2019, 04:00 PM
RE: table() data - compsystems - 02-22-2019 07:33 PM
|
User(s) browsing this thread: 1 Guest(s)