how to use symsum for this problem

3 次查看(过去 30 天)
sym=symsum([i-Un]^2,i,1,s);
SD=(sym/n)^1/2;

回答(1 个)

Torsten
Torsten 2022-9-21
If you use symbolic variables, you should name them as such.
And you shouldn't name a variable "sym", especially if you do symbolic computations.
syms Un n i
symbolic_sum=symsum((i-Un)^2,i,1,n);
SD=simplify((symbolic_sum/n)^1/2)
SD = 
  2 个评论
Walter Roberson
Walter Roberson 2022-9-21
Caution, ^1/2 is not ^(1/2)
syms Un n i
symbolic_sum=symsum((i-Un)^2,i,1,n);
SD=simplify((symbolic_sum/n)^(1/2))
SD = 

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Calculus 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by