15.3 The Classes orthpoly and polymeth
187
polynomials of ob1 and obj2 which are used to build the products and “info” with
some general information. Example:
obj1 = gegenbauerpoly(pi, 3);
% Object 1 and
obj2 = jacobipoly(0.75, 1.25, 3);
% object 2: Product
[Cprod, prodtab, info] = opolyprod(obj1, obj2, ’n1’,...
[1,3], ’n2’, 3);
>> Cprod
Cprod =
2x7 table
x6
x5
x4
...
x0
______
_______
_______ ... _______
Pi1_3
0
0
43.982 ...
0
Pi3_3
624.38
-117.07
-441.39 ...
0
>> prodtab
prodtab =
1
3
3
3
Method opolyint for integrating the polynomials with syntax[Cpint, prodtab,
Cpintvalue, info,Cprod] = opolyint(obj, ...), where “obj” is
an object of one of the subclasses of polymeth. with ... opolyint(obj)
all product combinations of the orthogonal polynomials of the object “obj” will
be integrated about the interval given by the property polyint. The following
name–value pairs are supported: “’n1”’ together with an integer vector and “’n2’
together with an integer vector. Both are optional with the same meaning as for
the method opolyprod. With p 1 and p 2 two polynomials of the object “obj”, the
syntax for computing 1 (x)|
d n
dx n p 2 (x) is ... = opolyint(_,’xd’,n) or
“xderivative” instead of “xd”. The syntax for computing 1 (x)|x n p 2 (x) is ...
= opolyint(_,’xp’,n) or “xpower” instead of “xp”. “n” has to be a positive
integer. The integration interval is by default the property “polyint”. In case the interval shall be changed to
b
a · · · the syntax is ... = opolyint(_,’defint’,
[a,b]). For integration with a weight function w(x) the syntax is ... =
opolyint(_,’wf’,hwf), with “hwf” the function handle of the weight function.
Example
% obj1 object of the Gegenbauer polynomial, see above
whf = @(x)exp(-x.^2); % weight function
[Cpint, prodtab, Cpintvalue, info,Cprod] = ...
opolyint(obj1, ’n1’,3,’n2’,3,’wf’,whf);
>> Cpintvalue
Cpintvalue =
table
IntVal
______
Pi3_3
387.53
187
polynomials of ob1 and obj2 which are used to build the products and “info” with
some general information. Example:
obj1 = gegenbauerpoly(pi, 3);
% Object 1 and
obj2 = jacobipoly(0.75, 1.25, 3);
% object 2: Product
[Cprod, prodtab, info] = opolyprod(obj1, obj2, ’n1’,...
[1,3], ’n2’, 3);
>> Cprod
Cprod =
2x7 table
x6
x5
x4
...
x0
______
_______
_______ ... _______
Pi1_3
0
0
43.982 ...
0
Pi3_3
624.38
-117.07
-441.39 ...
0
>> prodtab
prodtab =
1
3
3
3
Method opolyint for integrating the polynomials with syntax[Cpint, prodtab,
Cpintvalue, info,Cprod] = opolyint(obj, ...), where “obj” is
an object of one of the subclasses of polymeth. with ... opolyint(obj)
all product combinations of the orthogonal polynomials of the object “obj” will
be integrated about the interval given by the property polyint. The following
name–value pairs are supported: “’n1”’ together with an integer vector and “’n2’
together with an integer vector. Both are optional with the same meaning as for
the method opolyprod. With p 1 and p 2 two polynomials of the object “obj”, the
syntax for computing 1 (x)|
d n
dx n p 2 (x) is ... = opolyint(_,’xd’,n) or
“xderivative” instead of “xd”. The syntax for computing 1 (x)|x n p 2 (x) is ...
= opolyint(_,’xp’,n) or “xpower” instead of “xp”. “n” has to be a positive
integer. The integration interval is by default the property “polyint”. In case the interval shall be changed to
b
a · · · the syntax is ... = opolyint(_,’defint’,
[a,b]). For integration with a weight function w(x) the syntax is ... =
opolyint(_,’wf’,hwf), with “hwf” the function handle of the weight function.
Example
% obj1 object of the Gegenbauer polynomial, see above
whf = @(x)exp(-x.^2); % weight function
[Cpint, prodtab, Cpintvalue, info,Cprod] = ...
opolyint(obj1, ’n1’,3,’n2’,3,’wf’,whf);
>> Cpintvalue
Cpintvalue =
table
IntVal
______
Pi3_3
387.53
