I am trying to build my model in external mode. In this model i have a function block that contains the following code;
X1 = fsolve(f,[1,1,1]);
and in my function file i am trying to find a vector (x2,y2,z2) that is a unit vector and perpendicular to my existing vector (x1,y1,z1). The code is as follows;
function F = myFun(X1,x1,y1,z1)
F(1) = x1*X1(1)+y1*X1(2)+z1*X1(3)
F(2) = X1(1)*X1(1)+X1(2)*X1(2)+X1(3)*X1(3)-1
When i try build the model, the following error appears;
Simulink does not have enough information to determine output sizes for this block. If you think the errors below are inaccurate, try specifying types for the block inputs and/or sizes for the block outputs.
Component: MATLAB Function | Category: Coder error
Anonymous functions are not supported for code generation.
Function 'ForwardKinematics' (#24.1996.1997), line 77, column 3:
Launch diagnostic report.
I am using Matlab 2015b. Thanks for your help.