Operator matrix for matrix differentiation

9 ビュー (過去 30 日間)
Thomas
Thomas 2012 年 4 月 25 日
回答済み: Lam Nguyen Van 2021 年 2 月 24 日
Is there a way to define an operator matrix, such that:
  1 件のコメント
Jan
Jan 2012 年 4 月 26 日
Please define the inputs and outputs explicitly. Do you want numerical or symbolical operations?

サインインしてコメントする。

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 4 月 26 日
symbolic
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
  1 件のコメント
Jan
Jan 2012 年 4 月 26 日
What about: dNdv = [diff(N(1, :), v(1)), diff(N(2, :), v(1)); diff(N(3, :), v(2)), diff(N(4, :), v(2))] ?

サインインしてコメントする。

その他の回答 (1 件)

Lam Nguyen Van
Lam Nguyen Van 2021 年 2 月 24 日
Thanks.

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by