rbmatlab  1.13.10
 All Classes Namespaces Files Functions Variables Groups Pages
test_ldg_orthogonality.m
1 function OK = test_ldg_orthogonality
2 %function OK = test_ldg_orthogonality
3 %
4 % function testing, whether the ldg basis functions are orthogonal
5 % or not
6 
7 % Bernard Haasdonk 28.8.2009
8 
9 OK = 1;
10 
11 for pdeg = 1:4
12  for qdeg = (pdeg*2):11
13  [G,V] = ldg_basis_orthonormalization_matrix(pdeg,qdeg);
14  maxerr = max(max(abs(G-eye(size(G)))));
15  if maxerr>1e-5
16  OK = 0;
17  disp(['pdeg= ',num2str(pdeg),', qdeg=',num2str(qdeg),...
18  ',|G-I|_infty=',num2str(maxerr)])
19  error('ldg functions not orthogonal!')
20  end;
21  end;
22 end;%| \docupdate