Path: news.mathworks.com!not-for-mail
From: "Volker K" <klinkv.NOSPAM@yahoo.de>
Newsgroups: comp.soft-sys.matlab
Subject: Newbie: Subtract a vector from m-n-p array?
Date: Tue, 19 Feb 2008 15:37:06 +0000 (UTC)
Organization: TU Dresden
Lines: 16
Message-ID: <fpet32$rj1$1@fred.mathworks.com>
Reply-To: "Volker K" <klinkv.NOSPAM@yahoo.de>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1203435426 28257 172.30.248.35 (19 Feb 2008 15:37:06 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 19 Feb 2008 15:37:06 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1174616
Xref: news.mathworks.com comp.soft-sys.matlab:452391



Hi all!

I have a m-n-p array A and a q-1 vector V.

What I would like to do:

A(:,:,1)-V(1)
A(:,:,2)-V(2)
A(:,:,3)-V(3)


Anyone has an idea how to do that without a loop?

Thanks!
Volker