So I've never seen it done this way which greatly surprised me, after a moment of thinking. You can remove a single value from a list with a single command:
To remove the sixth element of a list:

Code:
{1,2,3,4,5,6,7,8,9,0→L₁
augment(seq(L₁(X),X,1,5),seq(L₁(X),X,7,dim(L₁


Now that I look at this, this seems almost obvious to me. But every time I've seen it done, it was with a for loop involved somewhere.
That's exactly the method I was going to suggest when I saw the title of this topic, before I opened it and saw it was a statement rather than a question. I don't think I would go the For() loop route under any circumstance, but I wouldn't be surprise if Weregoose can pull out some crazy BASIC-fu that's faster that augmenting those two seq()s.
How about this?

Code:
seq(L₁(X+(X≥6)),X,1,dim(L₁)-1)
Aaaaah I see what you did there! Very smart! Very Happy

That's so much more efficient than anything I've ever seen Smile
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are GMT - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement