MATLAB Answers

How to compute arccos for a matrix?

37 ビュー (過去 30 日間)
Omar B.
Omar B. 2020 年 7 月 4 日
コメント済み: Walter Roberson 2020 年 7 月 7 日
I would like to compute the arccos for a matrix. I know when I want to find log(), exp(), and sqrt () for a matrix , we use logm(A), expm(A) and sqrtm(A) where A is a matrix.
I want to find the following:
x=acos(sqrtm(A)\eye(n))
so, Is it correct to compute it like this ? Or we need to use arccosm(sqrtm(A)\eye(n))? Thank you.

  2 件のコメント

Walter Roberson
Walter Roberson 2020 年 7 月 4 日
There are no trig matrix functions in MATLAB, except the ones that work element by element.
Omar B.
Omar B. 2020 年 7 月 4 日
So, is it correct to compute the following?
x=acos(sqrtm(A)\eye(n))

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

回答 (1 件)

Walter Roberson
Walter Roberson 2020 年 7 月 5 日
It depends what you are trying to calculate.
And so we could potentially generalize that for matrices, there might be some meaning to
arccosm = @(z) 1i * logm(z + sqrtm(z^2 - 1))
I am having difficulty thinking of a context in which there could be physical meaning for this.
If we substitute in 1/sqrtm(A) then
1i*logm(sqrtm(A\eye(n) - 1) + sqrtm(A)\eye(m))
But is there a meaning for this??

  11 件のコメント

表示 8 件の古いコメント
Walter Roberson
Walter Roberson 2020 年 7 月 6 日
f = acos(inv(sqrtm(A))/sqrtm(A));
Maybe.
Omar B.
Omar B. 2020 年 7 月 7 日
I really appreciate your help. I am really confused about that. I want to evaluat matrix A at the following function
f(x)=arccos(1/sqrt(x))/sqrt(x)
Walter Roberson
Walter Roberson 2020 年 7 月 7 日
f1 = @(x) acos(sqrtm(x)^(-1)) * sqrtm(x)^(-1);
f2 = @(x) acos(sqrtm(x)/eye(size(x,1))) / sqrtm(x);
f3 = @(x) acos(1./sqrt(x)) ./ sqrt(x);
f1(A)
f2(A)
f3(A)
Try them all and decide which one is the right solution for you.

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

カテゴリ

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by