MATLAB: Translate equation to matlab code

equationsnell law

Capture_equation.PNG
hellow I would like to translate this equation to matlab code, I am new to matlab language and syntax and would very much appreciate help.

Best Answer

s2_hat= n1/n2*(N_hat*(-N_hat*s1_hat))-N_hat*sqrt(1-(n1/n2)^2*(N_hat*s1_hat)*(N_hat*s1_hat))
Related Question