How do you plot a summation function? please help.

조회 수: 22 (최근 30일)
Juan Murcia
Juan Murcia 2020년 11월 4일
답변: Walter Roberson 2020년 11월 4일
nmax= 11. and z∈{0~+10}.
How do you plot this function? this is the inside of the Summation, if it is any helpful.
f = [(-1^k)*(x^(2*k+1))*2]/[(sqrt(pi))*(factorial(k))*(2*k+1)]
Now I need to do the summation and plot it from 0 to 11 with a z from 0 to 10.

답변 (1개)

Walter Roberson
Walter Roberson 2020년 11월 4일
f = @(x,k) ((-1.^k).*(x.^(2*k+1))*2)./((sqrt(pi))*(factorial(k)).*(2*k+1))
z = [0, 1, 2];
n = 0:11;
erfz = 2/sqrt(pi)*sum(f(z(:), n),2)
and now plot.

카테고리

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