function plotRBIR(sinr,snreff,rbir,theta,k)
% plotRBIR Example helper function

%   Copyright 2019 The MathWorks, Inc.

figure;

% Plot RBIR per subcarrier and average RBIR
subplot(211)
ht = plot(k,theta);
title('RBIR')
ylabel('bits')
xlabel('Subcarrier index')
hold on;
ha = plot(k,repmat(rbir,size(k)));
legend([ht(1),ha],'RBIR per subcarrier','Average RBIR','location','best')
ylim([min(ylim) ceil(max(ylim))+0.1])
grid on;

% Plot SINR per subcarrier and effective SINR
subplot(212)
hs = plot(k,sinr);
hold on;
he = plot(k,repmat(snreff,size(k)));
title('SINR')
ylabel('dB')
xlabel('Subcarrier index')
legend([hs(1) he],'SINR per subcarrier','Effective SINR','location','best')
grid on;

end