| Author |
Comment/Response |
Eugene
|
03/16/12 10:48am
Dear All:
I have an Array with numbers from 1 to 250. I need to subtract from each element of the array some number (for example 15) and then check if the result is less than 0, return 0, if greater - return this number in power 3. Thus, as a result, I have to get another Array with numbers.
Here is my condition, but it doesn't work and I have no idea how to fix it.
x = Array[{#1} &, 250];
u1 = 15;
If [(x - u1) < 0, 0, (x - u1)^3]
I've already checked everywhere, but the result is still negative.
Could somebody, please, help me?
Thank you in advance!
URL: , |
|