How can I coding this function correctly?

4 次查看(过去 30 天)
Write a function called Harmonic Sum.The input to this function is a single number, n. The function will return the value 1 + 1/2 + 1/3 + ... + 1/n.

回答(1 个)

Ameer Hamza
Ameer Hamza 2020-9-26
Since this is a homework question so I won't be giving exact code, but you can read the documentation of the following functions.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by