Post Reply 
Add a value at the start of a list.
01-10-2024, 10:57 PM (This post was last modified: 01-10-2024 11:41 PM by matalog.)
Post: #1
Add a value at the start of a list.
Is there a way to add a value to the start of a list?

Once I had asked if there was a way to delete a value at the start of a list, here on this forum, and was shown this page: https://www-fourier.ujf-grenoble.fr/~par...#sec%3Aseq which has the command "insert()" which would be fine I think, but are those xcas commands usable on the HP Prime?

I found CONCAT, but it doesn't seem to do what I need. If I had a list: L1:=CONVERT(123,"base",2); If I then CONCAT(L2,L1) I end up with L1={2,3,[1 1 1 1 0 1 1]}, but I actually want [2 3 1 1 1 1 0 1 1].

I'm pretty sure my terminology of some part of this is wrong here, I am getting mixed up between the [] type of lists and the {} type of lists. What is the difference?

If I : CONCAT(MAKEMAT(0,3),[1 0 1]) I end up with {[0 0 0],[1 0 1]} instead of [0 0 0 1 0 1].
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Add a value at the start of a list. - matalog - 01-10-2024 10:57 PM



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