Evaluating Function at Matrix ?

2 ビュー (過去 30 日間)
Omar B.
Omar B. 2020 年 1 月 26 日
コメント済み: Omar B. 2020 年 1 月 26 日
How can we evaluate the following function at matrix A?

採用された回答

Walter Roberson
Walter Roberson 2020 年 1 月 26 日
F = @(x) exp(5*pi*(x-0.5)./(7*0.5)) .* (cos(5*pi*(x-0.5)./(7*0.5)) - sin(5*pi*(x-0.5)./(7*0.5)));
A = randn(11,5);
F(A)
  2 件のコメント
Walter Roberson
Walter Roberson 2020 年 1 月 26 日
The funm((),@sin) is certainly not right as you must pass a matrix as the first argument.
The rest looks doubtful, but I suppose there could be a context under which something like that was appropriate.
Note though that the formula involves x-.5 which involves subtracting .5 from every element of x, not just from the diagonal of x. If you are going to say that represents matrix exponential, then you must assume that it already has any matrix vs scalar corrections applied.
Omar B.
Omar B. 2020 年 1 月 26 日
Thank you so much.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrix Indexing についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by