MATLAB: Invalid expression. When calling…

exponentiating a functionMATLAB

I have a code that says
Invalid expression. When calling a function or indexing a variable, use parentheses. Otherwise, check for mismatched delimiters.
when i am trying to type cos^2(x/2). Also, i have defined x as pi/6.

Best Answer

cos(x/2)^2