MATLAB: Error in creating a function

functionfunctionsMATLABmatlab function

What's wrong in the following expression?
ObjectiveFunction = @x() sim(net, x')

Best Answer

hi try this,
ObjectiveFunction = @(x) sim(net, x')
REASON: FUNCTION HANDLE SHOULD BE DETERMINED INSIDE PARENTHESES.