i have a proplem with some matrix

1 回表示 (過去 30 日間)
ali
ali 2014 年 12 月 23 日
回答済み: mohammad 2014 年 12 月 23 日
how can i get [10 0;0 10] and [-10 0 ;0 -10] from squre root of [100 0;0 100] ali

回答 (2 件)

Geoff Hayes
Geoff Hayes 2014 年 12 月 23 日
Ali - if you assume that all elements in your matrix are positive, then you could use the sqrt function as
A = [100 0 ; 0 100];
R1 = sqrt(A);
R2 = -sqrt(A);
  1 件のコメント
ali
ali 2014 年 12 月 23 日
編集済み: ali 2014 年 12 月 23 日
in this case i should have two result , but in case A.1/3 i should have 3 results ,and what if they are negitive ?

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


mohammad
mohammad 2014 年 12 月 23 日
You can use this
A = [100 0 ; 0 100];
syms B
solve('B*B-A')
this gives you two answers and if arrays of A are negative, there will be no problem.

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by