1 function res = power_vector2_derivative(x,pdeg)
2 %
function res = power_vector2_derivative(x,pdeg)
4 %
function computing the derivative of the power-vector, which is
5 % the vector of all monomials of degree pdeg of
6 % the vector x, which is assumed to be 2-dimensional (resp: only
7 % first two entries are used)
9 % res hence is a jacobian matrix of size num_monomials x 2 matrix.
11 % Bernard Haasdonk 28.8.2009
23 % res = [1,x(1),x(2),x(1)^2, x(1)*x(2),x(2)^2]
';
24 % res = [1,x(1),x(2),x(1)^2, x(1)*x(2),x(2)^2]';
32 % res = [1,x(1),x(2),x(1)^2, x(1)*x(2),x(2)^2,...
33 % x(1)^3, x(1)^2*x(2), x(1) * x(2)^2, x(2)^3]
';
41 2*x(1)*x(2),x(1)^2; ...
42 x(2)^2,x(1)*x(2)*2; ...
45 % res = [1,x(1),x(2),x(1)^2, x(1)*x(2),x(2)^2,...
46 % x(1)^3, x(1)^2*x(2), x(1) * x(2)^2, x(2)^3,...
47 % x(1)^4, x(1)^3*x(2), x(1)^2*x(2)^2, x(1)* x(2)^3, x(2)^4]';
55 2*x(1)*x(2),x(1)^2; ...
56 x(2)^2,x(1)*x(2)*2; ...
59 3*x(1)^2*x(2), x(1)^3; ...
60 2*x(1)*x(2)^2,x(1)^2*2*x(2); ...
61 x(2)^3,x(1)*3* x(2)^2; ...
64 error(
'powervector not defined for desired pdeg')