-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathJacobiBaseDX.m
More file actions
29 lines (26 loc) · 780 Bytes
/
JacobiBaseDX.m
File metadata and controls
29 lines (26 loc) · 780 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function dbase = JacobiBaseDX(x, P)
%
% JacobBaseDX.m - Compute the derivatives Jacobi polynomial basis functions
% in space.
%
% Syntax: based = JacobBaseDX(x, mode);
%
% Input : x = x-coordinate in row vector form -1<x<1
% P = the highest number of mode 0<= p <=P
%
% Output: dbase = bases function derivatives stored at location x stored as
% (P+1) x length(x).
%
% NO WARNING MESSAGE IS GIVEN WHEN PAPAMETERS ARE OUT OF RANGE.
%
% Written by Dongbin Xiu 3/26/2004.
%
np = length(x);
dbase = zeros(P+1,np);
dbase(1,:) = -0.5;
dbase(P+1,:) = 0.5;
for p=1:P-1
dbase(p+1,:) = -0.5*(1+x)/2.*JacobiF(x, p-1, 1, 1) + ...
0.5*(1-x)/2.*JacobiF(x, p-1, 1, 1) + ...
(1-x)/2.*(1+x)/2.*JacobiD(x, p-1, 1, 1);
end