matlab does not simplify the expression?

5 ビュー (過去 30 日間)
PAOLA
PAOLA 2012 年 9 月 29 日
コメント済み: Luan Trinh 2014 年 11 月 27 日
Hi Everyone,
I would like to find the code to convert the expression (x^10)^1/5 into x^2 but I can't find it. I'm actually trying to come up with an algorithm to solve the SVD. But when trying to find the eigenvectors i have to solve a system of equations with infinite solutions and that's where I get stuck. X1 is defined as follows
X1 =
x1
x2
and I would like to execute
ecua1=X(1); L=sqrt(X1(1)^2 + (solve(ecua1,'x2'))^2)
but in the last line
L=sqrt(X1(1)^2 + (solve(ecua1,'x2'))^2) ---> L = 2^(1/2)*(x1^2)^(1/2)
matlab does not simplify the expression and thus I can't continue.
Please, I would really appreciate any help!!
Thanks,
Paola

回答 (3 件)

Matt Fig
Matt Fig 2012 年 9 月 29 日
編集済み: Matt Fig 2012 年 9 月 29 日
syms x
simplify((x^10)^(1/5),'IgnoreAnalyticConstraints',true)
  2 件のコメント
PAOLA
PAOLA 2012 年 10 月 1 日
Thank you very much for your answer, I tried to use the 'IgnoreAnalyticConstraints' but Mathlab shows the following error ??? Error using ==> sym.simplify Too many input arguments. Do you know if there is any constraint on the use of simplify function on Matlab R2009b 64 bits??
Walter Roberson
Walter Roberson 2012 年 10 月 1 日
R2009b had only very simple constraint management when you call simplify() from the MATLAB level instead of from within MuPAD itself. See the sym() command for how to constrain x to be real-valued.

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


Walter Roberson
Walter Roberson 2012 年 9 月 29 日
(x^10)^(1/5) is not generally x^2. p^(1/5) has five complex roots, so (x^10)^(1/5) needs to have 5 solutions, but x^2 is only a single value.
In order to get the simplification you have in mind, you will need to add assumptions of real-valued and non-negative.
  1 件のコメント
Luan Trinh
Luan Trinh 2014 年 11 月 27 日
Could you help me simplify this function?
syms a si f(si) = (a^2*(51056921947406336*exp(-si*2*i) + 51056921947406336*exp(si*2*i) + 12827342454285926*exp(-si*4*i) + 12827342454285926*exp(si*4*i) + 3572093376318669*exp(-si*6*i) + 3572093376318669*exp(si*6*i) + 301903902754734080)^2)/48357032784585166988247040000000000 ;
Thank you so much.

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


PAOLA
PAOLA 2012 年 10 月 10 日
I solve it removing the sym vars. and tried like a polynomial .Thanks for the answers!

カテゴリ

Help Center および File ExchangeNumeric Solvers についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by