help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: mean of 2 unequal matrices


From: Miroslaw Kwasniak
Subject: Re: mean of 2 unequal matrices
Date: Sun, 7 Jun 2009 14:42:20 +0200
User-agent: Mutt/1.5.9i

On Sun, Jun 07, 2009 at 07:43:20AM -0400, Ben Abbott wrote:
> 
> On Jun 7, 2009, at 7:36 AM, Huub van Niekerk wrote:
> 
> > Hi,
> >
> > I have 2 matrices: A: 200x1 and B: 300x1. I want to calculate the  
> > mean of the combined data but when I do mean_all = mean(A + B) I get  
> > these mesages because the matrices aren't of the same dimensions.:
> >
> > >mean_all = mean(A + B);
> > error: operator +: nonconformant arguments (op1 is 200x1, op2 is  
> > 300x1)
> > error: evaluating binary operator `+' near line 12, column 28
> > error: evaluating argument list element number 1
> > error: evaluating assignment expression near line 12, column 10
> >
> > How can I accomplish this? By adding the means of A and B?
> >
> 
> 
> A + B is addition. You want a union.

.. or concatenation ;)

mean([A;B])


reply via email to

[Prev in Thread] Current Thread [Next in Thread]