How to store values from toc into an array

조회 수: 64 (최근 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 CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by