开发者

MATLAB simplification functions divide by common factors problem

I have a complicated expression H which is derived from several other complicated intermediate step. I want to get the [N D] = numden(H).

The problem is that the expression H, N and D is not being "evaluated" and they are also not simplified and divided by common factors.

I am using syms x.

For example, I get

H = (27+81*(x^2-987605098534947/1125899906842624*x-...

That is just so cra开发者_开发技巧zy.. but clearly,

H = (27+81*(x^2-0.8772*x-...

how can I get it to evaluate to simplest form?

Thanks in advance!

EDIT: I found out the closest bet is using VPA


My own workaround:

  1. [num den] = numden(H)
  2. num = vpa(num, 4); den = vpa(den, 4);
  3. H = num/den;
  4. repeat from 1 until desired num and den are obtained.
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜