How to store values from toc into an array
36 次查看(过去 30 天)
显示 更早的评论
help with bonus question
回答(1 个)
Walter Roberson
2018-2-7
tic;
for K = 1 : 10
times(K) = toc;
end
6 个评论
Walter Roberson
2018-2-7
编辑:Walter Roberson
2018-2-7
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 .
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!