Sum of series (infinity upper limit), only want odd number
조회 수: 13 (최근 30일)
이전 댓글 표시
I am trying to compute this function:
Were all the parameters are constant values, except for z and y which are known vectors. I guess I could use symsum function, but I don´t know how to specify that I only want odd value of the parameter n.
Any suggestions?
댓글 수: 0
채택된 답변
Walter Roberson
2021년 9월 23일
syms N y h w z
Pi = sym(pi);
symsum(1/(2*N-1) * (1 - cosh((2*N-1)*Pi*y/h)/cosh((2*N-1)*Pi*w/(2*h))) * sin((2*N-1) * Pi * z/h), N, 1, inf)
except for z and y which are known vectors
Be careful when using symbolic expressions and vectors. What does it mean to divide one vector by other for your purposes? You have to be careful with the multiplication too -- the part inside [] is a vector the same size as y, and the sin() is a vector the same size as z, but is algebraic matrix mutliplication implied?
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Calculus에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!