# MATLAB: How to calculate the angular error

Computer Vision Toolboximage processingImage Processing Toolbox

     The angular error ε is defined as the angular distance between the algorithm’s estimate of the light source (ee) and the true illuminant vector (el) in normalized     ε= Cos -1(el . ee ) this is the formula for calculation of angular error
This is the formula for calculate the angular error please give the code for that
thanking you

 e = acos(dot(el,ee));
 e = atan2(norm(cross(el,ee)),dot(el,ee));