フィルターのクリア

How can I calculate the first derivative of a vector with respect to a matrix?

2 ビュー (過去 30 日間)
Ahmed Nasr
Ahmed Nasr 2020 年 5 月 20 日
回答済み: Walter Roberson 2020 年 5 月 20 日
I have x = a*B*C, where x is 1*4 vector, a is 1*2 vector, B is 2*4 matrix, and C is 4*4 matrix.
How can I calculate the first derivative of the vector x with respect to matrix B?

採用された回答

Walter Roberson
Walter Roberson 2020 年 5 月 20 日
syms a [1 2]
syms B [2 4]
syms C [4 4]
x = a*B*C;
derivs = arrayfun(@(X) reshape(gradient(X, B(:)),size(B)), x, 'uniform', 0);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConversion Between Symbolic and Numeric についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by