norm_er = 1.301;
exp_er = 9.126;
log_er = 1.301;
ray_er = 2.606;
Errors = [norm_er,exp_er,log_er,ray_er];
tol = 1e-3;
min_error = min(Errors);
idxs = find((Errors-min_error) < tol);
error_str = ["Normal";"Exponential";"Log";"Rayleigh"];
if length(idxs)==0
error('something went wrong')
elseif length(idxs)=1
fprintf('%s Distribution is best\n',error_str(idxs))
elseif length(idxs)=length(Errors)
fprintf('All Distributions are equally good\n')
elseif length(idxs)=2
fprintf('%s and %s Distributions are best\n',error_str(idxs))
else
tmp = strjoin(error_str(idxs(1:end-1)),", ") + ", and " + error_str(idxs(end);
fprintf('%s Distributions are best',tmp)
end