MATLAB: Syntax error in Simulink

errorsimulinksyntax

I am getting a syntax error in Simulink in a Fcn block:
((u(2)*(u(3))^2)/12)-((u(2)*u(3))^2)/8)*((1-2*(u(1)/u(3)))-(1/3)*(1-2*(u(1)/u(3)))^3)
I really can't find the problem in this so a little help is appreciated.

Best Answer

You have a problem with brackets
(u(2)*u(3)^2)/12-((u(2)*u(3))^2)/8*(1-2*u(1)/u(3))-(1/3)*(1-2*u(1)/u(3))^3