MATLAB: Normalize using a formula

multiple matricesnormalize

Hey guys,
I have two 337×31 matrices called Results1 and Results2. I need to normalize some data from this using the following formula:
Rn = (R-(T1+T2)/2)/(T1-T2)/2)
Where R is Results1(:,8)
T1 is Results1(:,23)
T2 is Results2(:,23)
Is there an easy way to do this, maybe some function in matlab itself I'm not aware of?
Thanks, Joey

Best Answer

R1 = rand(337,31) ; % results 1
R2 = rand(337,31) ; % results 2
R = R1(:,8) ;
T1 = R1(:,23) ;
T2 = R2(:,23) ;
Rn = (R-(T1+T2)/2)./((T1-T2)/2) ;