Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!p7g2000yqa.googlegroups.com!not-for-mail
From: ImageAnalyst <imageanalyst@mailinator.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: loop with manipulation of matrix multiplication
Date: Wed, 11 Aug 2010 19:37:39 -0700 (PDT)
Organization: http://groups.google.com
Lines: 17
Message-ID: <4cad2682-bb55-4a28-8608-3124e47b79e6@p7g2000yqa.googlegroups.com>
References: <i3vdpl$dn0$1@fred.mathworks.com> <14d4309a-1319-4a44-b1a8-a9058187f93e@v41g2000yqv.googlegroups.com> 
	<i3vl24$iha$1@fred.mathworks.com> <i3vlku$pq8$1@fred.mathworks.com>
NNTP-Posting-Host: 184.57.134.178
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1281580659 26487 127.0.0.1 (12 Aug 2010 02:37:39 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 12 Aug 2010 02:37:39 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: p7g2000yqa.googlegroups.com; posting-host=184.57.134.178; 
	posting-account=0rLUzAkAAABojYSRC64DkTbtiSCX77HH
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.8) 
	Gecko/20100722 Firefox/3.6.8,gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:661256

On Aug 11, 10:18 pm, "doug kopet" <onedo...@gmail.com> wrote:
> Also,my actual work has large matrices that is why I implied that I would I have to use loops.
>
> thanks
> doug
-----------------------------------------------------------------------
Well you can start with this:
for startingRow = 1:3
    MM(startingRow:3:end, :) % Display just for info.
    BB(startingRow, :)' % Display just for info.
    % Do the multiplication
    result_part = MM(startingRow:3:end, :) * BB(startingRow)'
end

But I'm not sure how you're getting "final_answer."  What's the
algorithm for that?  It's not simply summing the result_part's.