how to write summation with limits?

29 vues (au cours des 30 derniers jours)
rohail khan
rohail khan le 4 Avr 2018
hi, How can I write the following functions in matlab?
  2 commentaires
Birdman
Birdman le 5 Avr 2018
There are many ways. What have you tried so far?
rohail khan
rohail khan le 5 Avr 2018
Hi, I have tried the following
syms x
syms n
Mean=symsum(x,1,n)/n;
variance=symsum((x-Mean)^2,1,n)/n;

Connectez-vous pour commenter.

Réponses (1)

Birdman
Birdman le 5 Avr 2018
Try this:
syms mu variance x(i)
n=5;% you can change it
mu=symsum(x,i,1,n)/n
variance=symsum((x-mu).^2,i,1,n)/n

Catégories

En savoir plus sur Symbolic Math Toolbox dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by