Info

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

write a symbolic sum

1 visualizzazione (ultimi 30 giorni)
mohamad momeni
mohamad momeni il 10 Apr 2017
Chiuso: MATLAB Answer Bot il 20 Ago 2021
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?

Risposte (1)

Torsten
Torsten il 10 Apr 2017
Why symbolic ?
Use
f = sum(x)
Best wishes
Torsten.
  1 Commento
mohamad momeni
mohamad momeni il 15 Apr 2017
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?

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by