Sieve of Eratosthenes - 02 - MATLAB Cody - MATLAB Central

Problem 45367. Sieve of Eratosthenes - 02

Difficulty:Rate
 "Sift the Two's and Sift the Three's,
  The Sieve of Eratosthenes.
  When the multiples sublime,
  The numbers that remain are Prime."  ...anonymous

Sieve of Eratosthenes is a simple but ingenious ancient algorithm for finding all prime numbers up to n.

given a limit n, u've to find all the primes up to n. The built-in prime function of matlab is restricted.

Solution Stats

40.0% Correct | 60.0% Incorrect
Last Solution submitted on Nov 04, 2024

Problem Comments

Solution Comments

Show comments
AI Is Transforming Engineering Workflows
It’s an honor to deliver the keynote at MATLAB EXPO 2025. I'll...
0
MATLAB EXPO 2025 Registration is Now Open! November 12 – 13, 2025
Registration is now open for MathWorks annual virtual event MATLAB EXPO 2025...
0

Problem Recent Solvers18

Suggested Problems

More from this Author174

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!