Jacobi polynomials in MATLAB
조회 수: 12 (최근 30일)
이전 댓글 표시
i want to execute jacobi polynomials for N = j-3 where j= 0, 1,...,4, a = b = 3 and x = -0.655, the code according to my knowledge will be,
syms j
a= 3;
b=3;
for j = 0:4
display (jacobiP(j-3,3,3,-0.655))
end
but this code isn't working kindly guide me.
댓글 수: 0
답변 (1개)
Karan Gill
2016년 7월 6일
Your first argument "j-3" is negative for j=0,1,2. That's what the error message says: A nonnegative integer or a symbol is expected.
If you replace "j-3" with "j" it works.
syms j
a= 3;
b=3;
for j = 0:4
jacobiP(j,3,3,-0.655)
end
ans =
1
ans =
-2.6200
ans =
3.5765
ans =
-2.8153
ans =
0.4398
참고 항목
카테고리
Help Center 및 File Exchange에서 Polynomials에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!