フィルターのクリア

how to use symsum for this problem

2 ビュー (過去 30 日間)
Ashutosh
Ashutosh 2022 年 9 月 21 日
コメント済み: Walter Roberson 2022 年 9 月 21 日
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 件のコメント
Ashutosh
Ashutosh 2022 年 9 月 21 日
thank you
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 Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by