I´m trying to execute this function in MATLAB 2013a in a Matlab Function Block within a SIMULINK model.
I don´t know why but I get the following error:
"Code generation failed Incorrect number of right hand side elements in dot name assignment. Missing  around left hand side is a likely cause. "
Could you help me?