How to store values from toc into an array

14 ビュー (過去 30 日間)
Raiven Balderas
Raiven Balderas 2018 年 2 月 7 日
編集済み: Walter Roberson 2018 年 2 月 7 日
help with bonus question
  1 件のコメント
Raiven Balderas
Raiven Balderas 2018 年 2 月 7 日
i need help with question 5 and the bonus depicted in the screenshot/attachment

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 2 月 7 日
tic;
for K = 1 : 10
times(K) = toc;
end
  6 件のコメント
Raiven Balderas
Raiven Balderas 2018 年 2 月 7 日
thanks, how do i do the bonus ?
Walter Roberson
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 ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by