필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

create function that performs the following computation

조회 수: 1 (최근 30일)
Joe anson
Joe anson 2018년 10월 3일
마감: MATLAB Answer Bot 2021년 8월 20일
S=N = 1+1/2+1/3+1/4+.........1/N
Σ
K =1

답변 (1개)

KALYAN ACHARJYA
KALYAN ACHARJYA 2018년 10월 3일
function sum_result=sum1(n)
sum1=0;
for i=1:n
sum1=sum1+1/n;
end
end
Same can be done by using while loop also. It someone using indexing, it would be better.\
Learn Matlab by doing

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by