필터 지우기
필터 지우기

i have a proplem with some matrix

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

Community Treasure Hunt

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

Start Hunting!

Translated by