Path: news.mathworks.com!newsfeed-00.mathworks.com!solaris.cc.vt.edu!news.vt.edu!news.glorb.com!news2.glorb.com!tr22g12.aset.psu.edu!news.mathforum.org!not-for-mail
From: nick <nghiango79@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: matrix multiplication
Date: Sun, 27 Jun 2010 21:12:20 EDT
Organization: The Math Forum
Lines: 13
Message-ID: <1124078130.14069.1277687570117.JavaMail.root@gallium.mathforum.org>
NNTP-Posting-Host: gallium.mathforum.org
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
X-Trace: support1.mathforum.org 1277687570 29401 144.118.94.39 (28 Jun 2010 01:12:50 GMT)
X-Complaints-To: news@news.mathforum.org
NNTP-Posting-Date: Mon, 28 Jun 2010 01:12:50 +0000 (UTC)
Xref: news.mathworks.com comp.soft-sys.matlab:648517

Hi all,

Could someone please give me a hand for this simple question?

I want to multiply colum by colum of the two matrices.

For example: matrix X has the size (4,3) and matrix Y has the size (1,3). Is there any single Matlab command to produce a matrix Z in the following format:

Z = [X(:,1)*Y(1) X(:,2)*Y(2) X(:,3)*Y(3)]

Thanks heap for your inputs.

Nick