Matrix with differential operators - HELP

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 ?
Thanks in advance

回答 (3 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 9 日

0 投票

%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)

3 件のコメント

rodrigo
rodrigo 2013 年 10 月 9 日
Ok, but that is a matrix of derivates. I need a matrix with only de diferential operators in order to multiply it to another matrix.
Do you understand what i mean ? sorry if i can't explain ...
thanks
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 10 月 9 日
Maybe this is what you want
syms x y
f=@(h) [diff(h(1,1),y) diff(h(1,2),x);diff(h(2,1),x) -diff(h(2,2),y)]
h=[2*x+3*y 5*x+6*y;10*x+30*y 22*x-y]
f(h)
rodrigo
rodrigo 2013 年 10 月 9 日
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
rodrigo 2013 年 10 月 10 日

0 投票

Anyone can help me please ? Azzi's idea did not work for what want.
Thanks

1 件のコメント

Cedric
Cedric 2013 年 10 月 16 日
編集済み: Cedric 2013 年 10 月 16 日
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
Lam Nguyen Van 2021 年 2 月 24 日

0 投票

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

カテゴリ

製品

質問済み:

2013 年 10 月 9 日

回答済み:

2021 年 2 月 24 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by