Newsgroups: comp.soft-sys.matlab
Subject: averaging vectors of different dimensions
Date: Mon, 19 Jan 2009 15:24:38 -0800 (PST)
Lines: 19
Message-ID: <>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: 1232407478 941 (19 Jan 2009 23:24:38 GMT)
NNTP-Posting-Date: Mon, 19 Jan 2009 23:24:38 +0000 (UTC)
Injection-Info:; posting-host=; 
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; 
	rv:; Google-TR-3) Gecko/2008120121 Firefox/3.0.5,gzip(gfe),gzip(gfe)
Xref: comp.soft-sys.matlab:512580


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.