MATLAB: Substract element of a matrix!

substract;

I have this variable:
>> out1
ans =
Columns 1 through 5
[899x5 double] [899x5 double] [899x5 double] [899x5 double] [899x5 double]
Columns 6 through 10
[899x5 double] [899x5 double] [899x5 double] [899x6 double] [899x6 double]
Columns 11 through 15
[899x6 double] [899x6 double] [899x6 double] [899x6 double] [899x6 double]
Column 16
[899x6 double]
And I want to substract at each columns of the out variable the third element of each [899*5] or [899*6]

Best Answer

cellfun(@(c) bsxfun(@minus, c,c(3,:)) , out1,'uni',0)