i have a proplem with some matrix
Show older comments
how can i get [10 0;0 10] and [-10 0 ;0 -10] from squre root of [100 0;0 100] ali
Answers (2)
Geoff Hayes
on 23 Dec 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 Comment
mohammad
on 23 Dec 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.
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!