MATLAB: Putting equasion to matlab

mathematics

Hello, I need to put this into matlab, and I cant do it, can anyone help me write it to matlab?3ea80cbca9f82665260b0d687d197ca7.png

Best Answer

Both of log10(20) and cos(20) are real, so the input to sin is also real. [If you're working in degrees, you should use sind and cosd instead of sin and cos.]
The value of sin(z) for any real z is in the range [-1, 1].
The value of sin(z).^2 for any real z is in the range [0, 1].
Subtracting 1 from a value in the range [0, 1] gives a value in the range [-1, 0]. The only way the result of taking the square root of that quantity is real is if sin(z) is exactly 1 (making sin(z)-1 exactly 0.) Otherwise you're taking the square root of a negative number. For x = 20, is sin(z) exactly equal to 1?
The fifth root of 401 (= 20^2+1) is positive so the log of that number is also real. So you're dividing an imaginary number by a real number.