Filter löschen
Filter löschen

Operator matrix for matrix differentiation

7 Ansichten (letzte 30 Tage)
Thomas
Thomas am 25 Apr. 2012
Beantwortet: Lam Nguyen Van am 24 Feb. 2021
Is there a way to define an operator matrix, such that:
  1 Kommentar
Jan
Jan am 26 Apr. 2012
Please define the inputs and outputs explicitly. Do you want numerical or symbolical operations?

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 26 Apr. 2012
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 Kommentar
Jan
Jan am 26 Apr. 2012
What about: dNdv = [diff(N(1, :), v(1)), diff(N(2, :), v(1)); diff(N(3, :), v(2)), diff(N(4, :), v(2))] ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (1)

Lam Nguyen Van
Lam Nguyen Van am 24 Feb. 2021
Thanks.

Kategorien

Mehr zu Formula Manipulation and Simplification finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by