Operator matrix for matrix differentiation

7 vues (au cours des 30 derniers jours)
Thomas
Thomas le 25 Avr 2012
Is there a way to define an operator matrix, such that:
  1 commentaire
Jan
Jan le 26 Avr 2012
Please define the inputs and outputs explicitly. Do you want numerical or symbolical operations?

Connectez-vous pour commenter.

Réponse acceptée

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

Connectez-vous pour commenter.

Plus de réponses (1)

Lam Nguyen Van
Lam Nguyen Van le 24 Fév 2021
Thanks.

Catégories

En savoir plus sur Formula Manipulation and Simplification dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by