Effacer les filtres
Effacer les filtres

summation of equation in matlab

1 vue (au cours des 30 derniers jours)
Niharika  Nayak
Niharika Nayak le 27 Jan 2020
Commenté : Wisal Adnan le 18 Août 2020
I have an equation
S(i)*(P-C(i))
I want to perform summation operation such that
where n can be n=2 ,3 ,4....
please tell me what will be the approached???
  1 commentaire
Niharika  Nayak
Niharika Nayak le 27 Jan 2020
It works thanks ?

Connectez-vous pour commenter.

Réponse acceptée

Walter Roberson
Walter Roberson le 27 Jan 2020
sum(S(1:n) .* (P - C(1:n)))
In the case where n is the same as the size of S and C then this can be simplified to
sum(S .* (P - C))
  1 commentaire
Wisal Adnan
Wisal Adnan le 18 Août 2020
I want to perform summation operation such that
where n can be n=2 ,3 ,4.... where i start from 1 to 2n
please tell me what will solution?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by