Hello every one.
In my Simulink model I am using a Function block (Fcn) having input from a mux block having 6 inputs. In the space of the Function block I wrote the expression:
When I run the simulation I had the message of a syntax error in the block of the Function (Fcn). So to check if all the parentheses in my expression are balanced, I copied the expression above in the command window and I have replaced u(1), u(2), u(3), u(4), u(5) and u(6) respectively by the numbers 1,2,3,4,5 and 6 and I obtained the expression below.
When I hit enter the result was 1.1625 which shows that there is no errors in the writing of the expression.
When I have replaced the Function block (Fcn) by the interpreted Matlab function block and copied in it the same expression and gave to the inputs u(1),u(2),u(3),u(4),u(5), and u(6) the values of 1,2,3,4,5, and 6 I did not receive an error message but the result displayed in the display block was 2 which is wrong because different from the 1.1625 calculated in the command window.
Could anyone tell me how to solve my problem ????
Thanks in advance to everyone.