How do I make matrix dimensions in Matlab the same so that it agrees
I am having error performing this equation and although I know the size of each matrix, I do not know how to make them the same size.

rec=meanw*ones(1,size(Data,2))+Bgw*cgw;

??? Error using ==> mtimes
Inner matrix dimensions must agree.

1. size (meanw)

ans =

    25     2

2. size (ones(1,size(Data,2)))

ans =

     1   253

3. size (Bgw*cgw)

ans =

       19200         253


I am guessing I would need to multiply some of the matrix with zeros or ones to make them the same size.

How do I make matrix dimensions in Matlab the same so that it agrees
===

I am having error performing this equation and although I know the size of each matrix, I do not know how to make them the same size.

rec=meanw*ones(1,size(Data,2))+Bgw*cgw;

??? Error using ==> mtimes
Inner matrix dimensions must agree.

1. size (meanw)

ans =

    25     2

2. size (ones(1,size(Data,2)))

ans =

     1   253

3. size (Bgw*cgw)

ans =

       19200         253


I am guessing I would need to multiply some of the matrix with zeros or ones to make them the same size.
