(Solved) Help with please these are hard
이전 댓글 표시
;
' Write a function called threshold that determines the number of terms required for the sum
In other words, your output arguments are terms that gives the number of n required for
sum to exceed a limit; and total that gives that sum.'
댓글 수: 2
Rik
2021년 5월 27일
Why did you edit away parts of your question? That is very rude.
Rena Berman
2021년 6월 29일
(Answers Dev) Restored edit
채택된 답변
추가 답변 (1개)
Nikita Agrawal
2021년 5월 26일
function [number_of_terms] = threshold(limit)
T = 0;
k=1
while T < limit
T = T + 5*k*k-2*k;
k = k+1;
end
number_of_terms=k
end
카테고리
도움말 센터 및 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!