mindvirus

Joined: 03 Oct 2008 Posts: 1
|
Posted: October 3, 2008 11:23 AM Post subject: A few questions. |
|
|
Is there a way to delete specific indexes from a list?
For example, turn {1, 2, 3, 4, 5} into {1, 2, 3, 5}, deleting the 4th index?
Is there a way to use booleans in arithmetic? In other words, treat them as one or zero.
For example, seq(a[i]i, i, 1, dim(a)) where a is a list of true/false?
Finally, is there a way to make a list corresponding to a condition?
For example, seq(x|isPrime(x), x, 1, 10) where the returned value is a list of primes with minimum 1 and maximum 10, or:
seq(x|x≠5,x,1,10) where the returned value is a list of numbers from 1 to 10 without 5. |
|