Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!border1.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!o7g2000yqb.googlegroups.com!not-for-mail
From: kem <kemelmi@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: making an evaluation of a VERY long expression much faster
Date: Mon, 6 Jul 2009 00:29:00 -0700 (PDT)
Organization: http://groups.google.com
Lines: 29
Message-ID: <f49ae36e-2b18-4a13-b0ff-c4124fa129ed@o7g2000yqb.googlegroups.com>
References: <64605448-23d8-4aab-946f-a66103ac62b6@n11g2000yqb.googlegroups.com> 
	<932c3692-54a8-453b-bcf5-e6e0f69ca69f@h18g2000yqj.googlegroups.com> 
	<h2qji7$5uh$1@fred.mathworks.com>
NNTP-Posting-Host: 132.77.4.43
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1246865341 6605 127.0.0.1 (6 Jul 2009 07:29:01 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 6 Jul 2009 07:29:01 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: o7g2000yqb.googlegroups.com; posting-host=132.77.4.43; 
	posting-account=UKxCVgoAAAABvWaCgw-9-SAknbQcOdS3
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; 
	Trident/4.0; .NET CLR 1.1.4322; .NET CLR 2.0.50727),gzip(gfe),gzip(gfe)
X-HTTP-Via: 1.1 wisweb (NetCache NetApp/6.0.6)
Bytes: 2653
Xref: news.mathworks.com comp.soft-sys.matlab:552985


On Jul 5, 7:15 pm, "Matt " <x...@whatever.com> wrote:
> kem <keme...@gmail.com> wrote in message <932c3692-54a8-453b-bcf5-e6e0f69ca...@h18g2000yqj.googlegroups.com>...
>
> > Hi Arun and James,
> > Thanks for your response.
>
> > Here's the expression I am evaluating:
>
> > E=ux.*vy.^2.*c.*wx+2.*ux.*b.*wy.^2+ux.*c.*wx+2.*ux.*B.*wy+vy.^2.*c.*wx
> > +vx.^2.*a.*wy.^2+ux.^2.*b.*wy.^2+ux.^2.*g.*vy.^2+vy.*B.*wy+2.*vy.*c.*wx
> >....
>
> You might want to describe where this expression comes from. It's hard to imagine that a creature like this pops up in the initial formulation of a problem.
> In particular, might it have a factored form or originate from the expansion of a simpler expression?  If so, it would be better from the point of view of speed to work with the more compact, factored form.
>
> > Each of the variables is a 200x200 matrix. and I am calculating these
> > before the evaluation of this expression, in each iteration of the
> > optimization. Essentially I'd like to minimize this expression.
>
> That doesn't seem possible. If all the variables are 200x200 it means E is likewise 200x200. How do you plan to "minimize" a non-scalar expression?

E is 200x200 too. I plan to take an L2 norm of E and minimize it.