how to write summation with limits?
Show older comments
hi, How can I write the following functions in matlab?

2 Comments
Birdman
on 5 Apr 2018
There are many ways. What have you tried so far?
rohail khan
on 5 Apr 2018
Answers (1)
Birdman
on 5 Apr 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
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!