Operator matrix for matrix differentiation
9 次查看(过去 30 天)
显示 更早的评论
Is there a way to define an operator matrix, such that:
1 个评论
Jan
2012-4-26
Please define the inputs and outputs explicitly. Do you want numerical or symbolical operations?
采纳的回答
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
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!