how to write summation with limits?

33 次查看(过去 30 天)
hi, How can I write the following functions in matlab?
  2 个评论
Birdman
Birdman 2018-4-5
There are many ways. What have you tried so far?
rohail khan
rohail khan 2018-4-5
Hi, I have tried the following
syms x
syms n
Mean=symsum(x,1,n)/n;
variance=symsum((x-Mean)^2,1,n)/n;

请先登录,再进行评论。

回答(1 个)

Birdman
Birdman 2018-4-5
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

类别

Help CenterFile Exchange 中查找有关 Symbolic Math Toolbox 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by