Please tell me, how to make this code by using Simulink .
x0 = [-1.2,1];
x = fminsearch(fun,x0)
On User-defined Functions,S-Function, I programmed
'fun = @(x)100*(x(2) - x(1)^2)^2 + (1 - x(1))^2;'
For this block, I want to adopt fminsearch on the Simulink in order to find out minimized point[x1 x2]=[1 1].
Sorry, I can't use English well, but I want someone's answer. So if you don't know the meaning of my question, please tell me where don't you know.