MATLAB Answers


partial differentating a matrix by a vector

Asked by Tony Cheng on 30 Oct 2019
Latest activity Commented on by Bjorn Gustavsson on 12 Nov 2019 at 15:16
Hi guys,
I want to comute ,
where M is a symbolic matrix , and A is a symbolic vector. Are there any commands in Matlab can make it?
Many thanks!


Sign in to comment.

1 Answer

Answer by Bjorn Gustavsson on 30 Oct 2019
 Accepted Answer

Have a look at the help and documentation for jacobian.


Show 1 older comment
My bad, but: Same difference. What you ask for would then be something like the combined Jacobians for each row of your input matrix, how, you'd go about storing those differentials is for you to chose, and will depend on what you need to do with them. Sometimes I prefer using 3-D arrays. Sometimes it is beneficial to use 1 and 2-D arrays for neat matrix-multiplications, then it is easy to convert matrices to column-vectors using:
V = M(:);
Then you've straightened out your matrix to a vector where you can directly use jacobian, after that you might want to reshape it to suit your needs.
Hi Bjorn, Thx so much forur great detailed description! I see how to use jacobian now! Your answer really helps a lot!
Thanks, I'm happy to have contributed.

Sign in to comment.