Gradient of vector-valued function
이전 댓글 표시
Code below throws an error. How is it possible to get the gradient for a vector-valued function?
syms a b1 b2 t
mfcn = matlabFunction(b1.*t^2+b2.*t, 'Vars', {[b1,b2],t})
gradient(mfcn,t)
답변 (2개)
Moritz Schulze
2017년 10월 24일
use diff instead of gradient which is equivalent for gradient operation for symbolic expressions
syms a b1 b2 t
mfcn = matlabFunction(b1.*t.^2+b2.*t,'Vars', {b1,b2,t})
diff(mfcn,t) % use diff instead of gradient
카테고리
도움말 센터 및 File Exchange에서 Surface Style에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!