필터 지우기
필터 지우기

Evaluating Function at Matrix ?

조회 수: 1 (최근 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 CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by