Info

此问题已关闭。 请重新打开它进行编辑或回答。

write a symbolic sum

1 次查看(过去 30 天)
mohamad momeni
mohamad momeni 2017-4-10
关闭: MATLAB Answer Bot 2021-8-20
hi, I've been trying to write a formula in matlab, but for more size how can i write it? i wanna write this: f=x(1)+x(2)+...+x(300). is there any code to write this?

回答(1 个)

Torsten
Torsten 2017-4-10
Why symbolic ?
Use
f = sum(x)
Best wishes
Torsten.
  1 个评论
mohamad momeni
mohamad momeni 2017-4-15
hi sir "x" is a vector that we can write f like this>>> f=x(1)+x(2)+... how can i define x as a vector and then write a summation on it?

此问题已关闭。

Community Treasure Hunt

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

Start Hunting!

Translated by