Symbolic Math Error using diff
1 次查看(过去 30 天)
显示 更早的评论
Hi All,
I was wondering why it is not possible to do the following
x = sym('x',[2 1]); A = sym('A',[2 2]);
diff(x'*A*x,'x')
ans = 0
Is there an alternative method to preform this differentiation?
Thanks
采纳的回答
sixwwwwww
2013-11-3
Dear Carlas, you can try something like this:
x = sym('x%d',[2 1]);
A = sym('A%d%d',[2 2]);
x1 = diff(x' * A * x, x(1));
x2 = diff(x' * A * x, x(2));
I hope it helps. Good luck!
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Special Values 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!