Path: news.mathworks.com!newsfeed-00.mathworks.com!newscon02.news.prodigy.net!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!1g2000prg.googlegroups.com!not-for-mail
From: tingxing@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: Re: Matlab: symbolic, expand
Date: Tue, 13 May 2008 08:30:01 -0700 (PDT)
Organization: http://groups.google.com
Lines: 30
Message-ID: <cf10e632-68c5-499e-95eb-572c3b4a95ca@1g2000prg.googlegroups.com>
References: <ec72399e-7ff2-48a8-9a88-1e287b665ae9@w8g2000prd.googlegroups.com> 
NNTP-Posting-Host: 219.194.64.96
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1210692601 11180 127.0.0.1 (13 May 2008 15:30:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Tue, 13 May 2008 15:30:01 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 1g2000prg.googlegroups.com; posting-host=219.194.64.96; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; ja; rv:1.8.1.14) 
Bytes: 1764
Xref: news.mathworks.com comp.soft-sys.matlab:468173


Really! Thanks.

I guess my previous failure is the result of some grammar errors
made during defining intermediate expressions.

Ting

>
> If you have Symbolic Math Toolbox and have defined x and y to be sym
> objects, then f should be "expanded" automatically.
>
> syms x y
> a = x * x + 2*x + 1
> b = y * y
> a11 = a * b
> b11 = a / b
> f = a11 + b11
>
> *snip intermediate output*
>
> f =
>
> (x^2+2*x+1)*y^2+(x^2+2*x+1)/y^2
>
>  If you want that result to be expanded even further, use EXPAND.
>
> --
> Steve Lord
> sl...@mathworks.com