MATLAB: How to convert this formula to matlab language

matlab function

Hi guys,
I would like to convert this formula to matlab language.
α = arctan(y − 1/3, x − 1/3) modulus 2π
I tried a=atan2(y-1/3,x-1/3)*mod(2pi) but mod function needs more variables
Thank you

Best Answer

a = mod(atan2(y-1/3,x-1/3), 2*pi)