Writing sums with a loop?

1 次查看(过去 30 天)
Vince Smith
Vince Smith 2019-4-8
How would I express this with a loop in MATLAB?
x=absolute value of (1000-)
  2 个评论
James Tursa
James Tursa 2019-4-8
What have you done so far? What specific problems are you having with your code?
Adam Danz
Adam Danz 2019-4-8
If you have no idea where to start, look up how to use these functions
  • abs()
  • sum()
  • for, end

请先登录,再进行评论。

回答(1 个)

Shivani Dixit
Shivani Dixit 2021-6-9
MATLAB provides you with and easy to understand document that you can take advantage of. The functions that the above mentioned equation requires are inbuilt in matlab , you can perform the summation by either using loop or multiplication , since the summation part is independent of variable n. You can leverage the below documentations :

类别

Help CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by