# Matrix with differential operators - HELP

34 views (last 30 days)
rodrigo on 9 Oct 2013
Answered: Lam Nguyen Van on 24 Feb 2021
Hello all,
I need some help of you!
I have a matrix of deferential operators (like the image in attachment) and i want to write it in a Matlab notation in order to multiply it with a matrix of functions.
Anyone can help me ?

Azzi Abdelmalek on 9 Oct 2013
%Example
syms x y
f=@(h) [diff(h,y) diff(h,x);diff(h,x) -diff(h,y)]
h=2*x+3*y
f(h)
rodrigo on 9 Oct 2013
More or less.
I have the matrix "h" with variable size. because that i have to multiply the operators matrix with expressions matrix, and not what that.
Any idea ?

rodrigo on 10 Oct 2013
Anyone can help me please ? Azzi's idea did not work for what want.
Thanks
Cedric Wannaz on 16 Oct 2013
What you want to achieve is still unclear to me. Do you need an "operator" which returns the analytical form of this matrix when applied to a function defined analytically/symbolically, or is it numeric?

Lam Nguyen Van on 24 Feb 2021
function dNdv = diffmtx(v,N)
% v -vector m x 1 - sym array
% N - matrix m x n - sym array
rz = arrayfun(@(ii)diff(N(ii,:),v(ii)),(1:numel(v)).','un',0);
dNdv = cat(1,rz{:});
end