Filter löschen
Filter löschen

i have a proplem with some matrix

3 Ansichten (letzte 30 Tage)
ali
ali am 23 Dez. 2014
Beantwortet: mohammad am 23 Dez. 2014
how can i get [10 0;0 10] and [-10 0 ;0 -10] from squre root of [100 0;0 100] ali

Antworten (2)

Geoff Hayes
Geoff Hayes am 23 Dez. 2014
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 Kommentar
ali
ali am 23 Dez. 2014
Bearbeitet: ali am 23 Dez. 2014
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 ?

Melden Sie sich an, um zu kommentieren.


mohammad
mohammad am 23 Dez. 2014
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.

Kategorien

Mehr zu Symbolic Math Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by