function plot_cordic_results(num,den,cordic_results)
%load numerator vectors
n=load(num,'num');
n=n.num;
%load denominator vectors
d=load(den,'den');
d=d.den;
%load cordic division results
rc=load(cordic_results,'result_cordic');
rc=rc.result_cordic;
%generate scatter 3d plot
num_val=reshape(n(2:end,1:end-1),numel(n(2:end,1:end-1)),1);
den_val=reshape(d(2:end,1:end-1),numel(d(2:end,1:end-1)),1);
error=reshape(rc(2:end,2:end),numel(rc(2:end,2:end)),1)-num_val./den_val;
s=scatter3(den_val,num_val,error);
s.DataTipTemplate.DataTipRows(1).Label='Denominator';%X axis is the denominator value
s.DataTipTemplate.DataTipRows(2).Label='Numerator';%Y axis is the numerator value
s.DataTipTemplate.DataTipRows(3).Label='Error';%Z axis is the error
title('7 pipeline stage cordic divide error');
ylabel('numerator');xlabel('denominator');zlabel('error');
end