|
On Feb 4, 5:32 pm, "John D'Errico" <woodch...@rochester.rr.com> wrote:
> "Wildo " <wildogonza...@yahoo.com> wrote in message <jgians$ab...@newscl01ah.mathworks.com>...
> > I have a 4d matrix irf(t,draw,var,lag), where t is time (173), draw(500) is a draw from a gibbs sampling, var(3) is a variable, and lag(21) is a lag. So the size of the matrix is 173x500x3x21.
>
> > But I need to convert it to a 3d matrix, where I want the mean of the 500x3x21 part converting to a 3x21 matrix, and put it in a 173x3x21.
>
> > How can I do this?
>
> Why do I think that the function mean would be a
> good start?
>
> Of course, you might decide then that a 173x1x3x21
> array was not what you wanted. So then if you think
> about it, how could you use reshape to help here?
>
> If that is more than you want, a little search might
> find squeeze for you.
>
> John
You may think that John means to be mean,
but what he means is you should use mean.
And if you mean to use mean, you should carefully read
help mean
|