|
From: | David Bateman |
Subject: | Re: how can I hold matrices in a container? |
Date: | Wed, 27 May 2009 23:31:11 +0200 |
User-agent: | Mozilla-Thunderbird 2.0.0.19 (X11/20090103) |
Dr. Johannes Zellner wrote:
Hi I'd like to do an operation like [A, B, C] .* [x, y, z] fast! A, B, C are matrices, x, y, z are scalar. The result should be simply a row of the scaled matrices like this: [A .* x, B .* y, C .* z] Apparently, holding [A, B, C] isn't possible. What's the recommended way to do this fast?
cellfun(@(x, y) x .* y, {A, B, C}, {x, y, z}, 'UniformOutput', false) -- David Bateman address@hidden 35 rue Gambetta +33 1 46 04 02 18 (Home) 92100 Boulogne-Billancourt FRANCE +33 6 72 01 06 33 (Mob)
[Prev in Thread] | Current Thread | [Next in Thread] |