Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

create function that performs the following computation

1 Ansicht (letzte 30 Tage)
Joe anson
Joe anson am 3 Okt. 2018
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
S=N = 1+1/2+1/3+1/4+.........1/N
Σ
K =1

Antworten (1)

KALYAN ACHARJYA
KALYAN ACHARJYA am 3 Okt. 2018
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

Diese Frage ist geschlossen.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by