This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Kirk
on 23 Jul 2014
Although the naming of primes is a poor choice,
primes = primes(nums);
can replace:
nums=2:n;
primes=nums(isprime(nums));
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!