Try to answer bonus question
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Raiven Balderas
el 7 de Feb. de 2018
Comentada: Birdman
el 7 de Feb. de 2018
Screenshot is attached. Comment what the code to the bonus question is. Also provide explanations.
0 comentarios
Respuesta aceptada
Birdman
el 7 de Feb. de 2018
Editada: Birdman
el 7 de Feb. de 2018
By using primes built in function of MATLAB:
function y=prime_count(n)
y=numel(primes(n));
plot(primes(n))
end
From command line:
prime_count(10)
>> 4
Más respuestas (0)
Ver también
Categorías
Más información sobre Loops and Conditional Statements en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!