From: Peter Smith on
hi all

i have two matrices, bid1 and bid2. Both are the same dimentions, 500*97
i would like to create a third matrix, maxbid, where every element is the maximum of bid1 or bi2. For example, row 1 colum 1 is the maximum of bid1 (row 1 column 1) and bid 2(row 2 column2); row 1 column 2 is the maxium of bi1 (row1 column 2) and bid2 (row1 column 2) etc ......

In addition, say if i wanted to delete column 2, 4 and 10 of bid 1 (for all rows) how would i do this.

many thanks for your help
From: Walter Roberson on
Peter Smith wrote:

> i have two matrices, bid1 and bid2. Both are the same dimentions, 500*97
> i would like to create a third matrix, maxbid, where every element is
> the maximum of bid1 or bi2. For example, row 1 colum 1 is the maximum of
> bid1 (row 1 column 1) and bid 2(row 2 column2); row 1 column 2 is the
> maxium of bi1 (row1 column 2) and bid2 (row1 column 2) etc ......

max(bid1, bid2)


> In addition, say if i wanted to delete column 2, 4 and 10 of bid 1 (for
> all rows) how would i do this.

bid1(:, [2, 4, 10]) = [];
From: Peter Smith on
Thanks Walter
You are the man
>
> > i have two matrices, bid1 and bid2. Both are the same dimentions, 500*97
> > i would like to create a third matrix, maxbid, where every element is
> > the maximum of bid1 or bi2. For example, row 1 colum 1 is the maximum of
> > bid1 (row 1 column 1) and bid 2(row 2 column2); row 1 column 2 is the
> > maxium of bi1 (row1 column 2) and bid2 (row1 column 2) etc ......
>
> max(bid1, bid2)
>
>
> > In addition, say if i wanted to delete column 2, 4 and 10 of bid 1 (for
> > all rows) how would i do this.
>
> bid1(:, [2, 4, 10]) = [];