フィルターのクリア

Symbolic substraction of multiple valued functions

1 回表示 (過去 30 日間)
Meva
Meva 2016 年 10 月 21 日
コメント済み: Meva 2016 年 10 月 22 日
Hello,
I have two equations which are the same but in a different format. byhand is arranged version of thetadouble function. If I substract byhand from thetadouble I should get zero, but instead Matlab just repeats what I typed. Please see below.
syms thetadouble(h, theta, kappa, b, a, c, gamma) byhand(h, theta, kappa, b, a, c, gamma)
thetadouble = (sqrt(a*kappa)*(a^3 *(1 - 2 *b) ...
- a^2 *(-1 + 2 * b) *(1 - 2*c + 2 * c^2) *kappa - (b - c) *(-1 + c) ...
*c *(h + theta - b *theta)^2 *kappa + ...
a *((-1 + b + c) * h^2 -2 *(-1 + b) *(-1 + b + c) *h*theta ...
+ (-1 + b)^2 *(-1 + b + c) * theta^2 - (-1 + 2*b) *(-1 + c)^2 *c^2 *kappa^2)) ...
- (b - c) *(h + theta - b *theta)^2 *...
(a^2 + a *(1 - 2 *c + 2 *c^2) *kappa + (-1 + c)^2 *c^2 *kappa^2) ...
*atan((-1 + c)*kappa/a) + (b -c) * (h + theta - b *theta)^2*(a^2 + a *(1 - 2 *c + 2 *c^2) * kappa + (-1 + c)^2 *c^2*kappa^2) ...
*atan(c *kappa/a))...
/(4*a^(3/2)*gamma *sqrt(kappa)...
*(a +(-1 + c)^2*kappa)* (a +c^2 *kappa));
byhand = (sqrt(a*kappa)*(a*(1 - 2*b)*(a^2 + kappa*a*(1 - 2 *c + 2 *c^2) + ...
c^2*kappa^2 *(1 - c)^2) + (b - c)*(1 - c)*c*(h + (1 - b)*theta)^2*kappa ...
+ a*(b - 1 + c)*(h + (1 - b)*theta)^2)...
+ (b - c) *(h + (1 - b )* theta)^2 * ...
(a^2 + a *(1 - 2 *c + 2 *c^2) ...
* kappa + (-1 + c)^2 *c^2*kappa^2)*(atan((1 - c) * sqrt(kappa/a))+ ...
atan(c * sqrt(kappa/a))))/((4 *a^(3/2) *gamma *sqrt(kappa) ...
*(a + (-1 + c)^2 *kappa)*(a +c^2 *kappa)));
diff = thetadouble - byhand
Please give me an idea. Thanks..

採用された回答

Steven Lord
Steven Lord 2016 年 10 月 21 日
What happens when you simplify the difference?
  1 件のコメント
Meva
Meva 2016 年 10 月 22 日
It worked thanks @Steven.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGamma Functions についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by