What's the desired range for X?
Read the "Getting Started" section on array indexing and operations...
In short, in MATLAB if you write something like
R = sinh(b*sigma*x)./(m*sinh(b*sigma*x) + b*cosh(b*sigma*x));
T = m ./ (m*sinh(b*sigma*x) + b*cosh(b*sigma*x));
you'll have two vectors R, T of the same length as x over those ranges. MUCH simpler than writing the loop.
Then, there's the conditional on the phi parameter to deal with...that's a little more effort, but not a lot--use logical addressing.
isLE_C=(x <= C);
phi(isLE_C) = 2*E./(1-R(isLE_C).^2);
isBT_C_CD = (x>C) & (x<(C+D));
phi(isBT_C_CD) = E./(1-R(isBT_C_CD)) + E(isBT_C_CD).*T(isBT_C_CD)./(1-R(isBT_C_CD));
isGT_CD = (x >= (C + D));
phi(isGT_CD) = E(isGT_CD).*T(isGT_CD)./(1-R(isGT_CD));
Then you have vectors x,phi to plot...
NB: Air code; may be some typos; may have missed a "dot" somewhere, but is the idea...