simplifying symbolic expressions using assumptions
조회 수: 5 (최근 30일)
이전 댓글 표시
Hi all,
I have a symbolic equation as follows:
A = X / (XY + 1);
I know that for my specific case XY >> 1
I wish to simplify this equation using this assumption such that the denominator simplifies to 1 + XY ~ XY and A becomes X/XY = 1/Y.
Are there tools/functions in the symbolic math toolbox that allow one to do these user defined simplifications on a symbolic expression?
If not then is there a way I can do this through some code?
Thanks, Bhupi
댓글 수: 0
채택된 답변
Yu Jiang
2014년 8월 4일
I don’t think there is a way to directly approximate a symbolic expression in MATLAB with another symbolic term.
However, here is a workaround for the example you provided. Since x*y >> 1, you may want to consider replace (x*y+1) with x*y by using the function sub (See Documentation) .
For example, the following code can be executed
>> syms x y
>> A = x/(x*y+1);
>> A = subs(A, 'x*y+1', 'x*y');
The result will be A = 1/y.
-Yu
추가 답변 (1개)
Christopher Creutzig
2014년 8월 29일
This approximation can be viewed as a special kind of truncated series:
>> syms X Y
>> A = X/(X*Y + 1);
>> taylor(A, Y, Inf, 'Order', 2)
ans =
1/Y
>> taylor(A, X, Inf, 'Order', 2)
ans =
1/Y - 1/(X*Y^2)
>> taylor(A, X, Inf, 'Order', 1)
ans =
1/Y
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!