Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Speed-up computation of equation containing several matrix sub-computations using parallel processing?

Subject: Speed-up computation of equation containing several matrix sub-computations using parallel processing?

From: Evan Ruzanski

Date: 24 Mar, 2011 10:51:04

Message: 1 of 3

Hello,

I'm trying to solve an equation of the form:

Y = Y0 - ( Un.* (A*Y0) + Vn.*(Y0*Z) )*delta_t

as efficiently as possible where Y0, Un, Vn, A, and Z are all square matrices of size on the order of 300 X 300 and delta_t is a constant.

Would computing A2 = A*Y0 and Z2 = Y0*Z followed by Un2 = Un.*A2 and Vn2 = Vn.*Z2 in parallel speed-up the overall computation of Y?

If so, what is the best way to do this (having access to the Parallel Computing Toolbox and a dual-core processor)?

Is there another/better way? Or does MATLAB automatically/internally optimize efficiency of such a computation?

Many thanks in advance...

Subject: Speed-up computation of equation containing several matrix sub-computations using parallel processing?

From: Bruno Luong

Date: 24 Mar, 2011 11:58:05

Message: 2 of 3

"Evan Ruzanski" wrote in message <imf7mo$ftb$1@fred.mathworks.com>...
> Hello,
>
> I'm trying to solve an equation of the form:
>
> Y = Y0 - ( Un.* (A*Y0) + Vn.*(Y0*Z) )*delta_t
>
> as efficiently as possible where Y0, Un, Vn, A, and Z are all square matrices of size on the order of 300 X 300 and delta_t is a constant.

Are you trying to "solve"? If yes what are known what are the unknowns?

Or do you want simply to compute Y?

Bruno

Subject: Speed-up computation of equation containing several matrix sub-computations using parallel processing?

From: Evan Ruzanski

Date: 24 Mar, 2011 18:07:05

Message: 3 of 3

"Bruno Luong" <b.luong@fogale.findmycountry> wrote in message <imfbkd$jlj$1@fred.mathworks.com>...
> "Evan Ruzanski" wrote in message <imf7mo$ftb$1@fred.mathworks.com>...
> > Hello,
> >
> > I'm trying to solve an equation of the form:
> >
> > Y = Y0 - ( Un.* (A*Y0) + Vn.*(Y0*Z) )*delta_t
> >
> > as efficiently as possible where Y0, Un, Vn, A, and Z are all square matrices of size on the order of 300 X 300 and delta_t is a constant.
>
> Are you trying to "solve"? If yes what are known what are the unknowns?
>
> Or do you want simply to compute Y?
>
> Bruno

Sorry for the error in semantics...I'm trying to compute Y in the most efficient manner possible. Is breaking the problem into:

Step 1. Solve A2 = A*Y0 and Z2 = Y0*Z in parallel
Step 2. Solve Un2 = Un.*A2 and Vn2 = Vn.*Z2 in parallel
Step 3. Solve Y = Y0 - (Un2 + Vn2)*dt

faster/more efficient than

Step 1. Solve Y = Y0 - ( Un.*(A*Y0) + Vn.*(Y0*Z) )*dt

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us