%This function calculates the reflection (R) and
%transmission (T) of a barrier with length L and
%height V at the energy (of the incoming particle) E.

%This function uses the function TMbarr

function [R,T]=RTbarr(E,L,V)

TM=TMbarr(E,L,V);

r=-TM(2,1)/TM(2,2);
t=TM(1,1)+r*TM(1,2);

R=abs(r^2);
T=abs(t^2);


