How to store values from toc into an array
22 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
help with bonus question
Réponses (1)
Walter Roberson
le 7 Fév 2018
tic;
for K = 1 : 10
times(K) = toc;
end
6 commentaires
Walter Roberson
le 7 Fév 2018
Modifié(e) : Walter Roberson
le 7 Fév 2018
You write a function named prime_count that takes n as an input and returns a vector named Upsilon which is of length n, each element of which is the number of prime numbers less than or equal to its index. The function prime_count must call prime_sieve exactly once -- however, it is not required that your function use the results returned by prime_sieve .
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!