The test's expectations don't match what's in the question text.
I must say that this sum is wrong. All even numbers from 1 to 100 add up to 2550, and not 2500. And the odd numbers from 1 to 100 add up to 2500.
Count up then down
Square the input
Compute LOG(1+X) in natural log
Find my daddy long leg (No 's')
Create vector as shown in test cases
Sort even numbers from 1 to 100
Which integer is positive which is negative or which one is nothing ?
Determine Positive or Negative
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office