필터 지우기
필터 지우기

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 CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by