Path: news.mathworks.com!newsfeed-00.mathworks.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!g38g2000yqn.googlegroups.com!not-for-mail
From: perfreem@gmail.com
Newsgroups: comp.soft-sys.matlab
Subject: averaging vectors of different dimensions
Date: Mon, 19 Jan 2009 15:24:38 -0800 (PST)
Organization: http://groups.google.com
Lines: 19
Message-ID: <d54e80af-5e1c-4601-9f1a-b7742ffb268a@g38g2000yqn.googlegroups.com>
NNTP-Posting-Host: 18.79.7.196
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1232407478 941 127.0.0.1 (19 Jan 2009 23:24:38 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 19 Jan 2009 23:24:38 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g38g2000yqn.googlegroups.com; posting-host=18.79.7.196; 
	posting-account=aj71ngoAAAAYxQ83mJE8SXkq6oPGq18K
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; 
	rv:1.9.0.5; Google-TR-3) Gecko/2008120121 Firefox/3.0.5,gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:512580

hello,

i am tryin to average together several columns of different matrices,
each column of slightly different sizes (difference might be one or
two elements).
for example, my columns a, b, c might be:
  a = my_mat1(:, 2); # size 10
  b = my_mat2(:, 2); # size 12
  c = my_mat3(:, 2); # size 11

i want to make a new vector d that contains the averages of all their
values. the first 10 values can be averaged, then for the 11th i want
to have the average of b and c's values, and for the 12 value i only
want c's value.

is there an easy way to do this? a simple: a' + b' + c' ./ 3 does not
work because a b and c are all different sizes....

    thank you.