请教 S-function报错问题: during flag=3 call must be a real vector of length 2

编写了一个S—Function函数,三输入两输出,
报错:Output returned by S-function 'controller' in 'VehicleMathModel/S-Function' during flag=3 call must be a real vector of length 2
网上求解方法:
1、sizes.DirFeedthrough = 1; %输出与输入没有直接关系0
2、x0 = [0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;0.01;];
均无效
想请教还有别的解决方法吗