Azzera filtri
Azzera filtri

Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

create function that performs the following computation

1 visualizzazione (ultimi 30 giorni)
Joe anson
Joe anson il 3 Ott 2018
Chiuso: MATLAB Answer Bot il 20 Ago 2021
S=N = 1+1/2+1/3+1/4+.........1/N
Σ
K =1

Risposte (1)

KALYAN ACHARJYA
KALYAN ACHARJYA il 3 Ott 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

Questa domanda è chiusa.

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by