Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
About
Team
Rules
Stats
Status
Sitemap
Chat
Downloads
Forum
News
Our Projects
Major Community Projects
Recent Posts
Unread Posts
Replies
Tools
SourceCoder3
Other Things...
Omnimaga Radio
TI-83 Plus ASM File Unsquisher
Z80 Conversion Tools
IES TI File Editor
Free RAM areas
Comprehensive Getkeyr table
URL Shortener
Online Axe Tilemap Editor
Help
Contact Us
Change Request
Report Issue/Bug
Team
Articles
Members
View the memberlist
Search For Members
Buddies
Login
Register
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
How to filter elements in a list?
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: How to filter elements in a list? (Read 2852 times)
0 Members and 1 Guest are viewing this topic.
blue_bear_94
LV8
Addict (Next: 1000)
Posts: 801
Rating: +25/-35
Touhou Enthusiast / Former Troll / 68k Programmer
How to filter elements in a list?
«
on:
August 29, 2013, 09:27:30 pm »
Suppose I have a list, say named R. I want every element less than 100 in R to appear in another list.
Even better, I have another named Q, and I'll need 2 lists, so that the elements in one list matches with the other.
For example:
R = {40, 230, 9, 102, 154, 308, 1}
Q = {1, 2, 3, 4, 5, 6, 7}
should give:
{40, 9, 1}
and
{1, 3, 7}
Logged
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (
2.30 2.55 MP
2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag
東方ぷろの
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: How to filter elements in a list?
«
Reply #1 on:
August 29, 2013, 11:21:15 pm »
What kind of problems are you having developing an algorithm yourself? Also depending on the application you are using it for, there might be some additional tricks that you could use if the restrictions were changed slightly.
Logged
blue_bear_94
LV8
Addict (Next: 1000)
Posts: 801
Rating: +25/-35
Touhou Enthusiast / Former Troll / 68k Programmer
Re: How to filter elements in a list?
«
Reply #2 on:
August 29, 2013, 11:35:55 pm »
I'd like a fast way to do this. I can actually think of this:
For(B,1,dim(
L
R
L
R(B
If Ans<
E
2
Then
Ans->
L
A(1+dim(
L
A
L
Q(B->
L
B(1+dim(
L
B
End
I was wondering who could formulate a faster way.
Logged
Due to dissatisfaction, I will be inactive on Omnimaga until further notice. (?? THP hasn't been much success and there's also the CE. I might possibly be here for a while.)
If you want to implore me to come back, or otherwise contact me, I can be found on GitHub (bluebear94), Twitter (@melranosF_), Reddit (/u/Fluffy8x), or e-mail (if you know my address). As a last resort, send me a PM on Cemetech (bluebear94) or join Touhou Prono (don't be fooled by the name). I've also enabled notifications for PMs on Omnimaga, but I don't advise using that since I might be banned.
Elvyna (Sunrise) 4 5%
TI-84+SE User (
2.30 2.55 MP
2.43)
TI-89 Titanium User (3.10)
Casio Prizm User? (1.02)
Bag
東方ぷろの
Builderboy
Physics Guru
CoT Emeritus
LV13
Extreme Addict (Next: 9001)
Posts: 5673
Rating: +613/-9
Would you kindly?
Re: How to filter elements in a list?
«
Reply #3 on:
August 30, 2013, 02:18:54 am »
Hmm I can think of a couple different ways to *almost* do the same thing, but not quite
Logged
Print
Pages: [
1
]
Go Up
« previous
next »
Omnimaga
»
Forum
»
Calculator Community
»
TI Calculators
»
TI-BASIC
»
How to filter elements in a list?