MATLAB: Nummerical derivative or gradient

fminconMATLABoptimizationOptimization Toolbox

Dear all, I have question and i try to ask in good way.
I want to link Matlab and fem software for nummerical optimization.
I have speecific value for each of my point, assuming i have beam and i can find deflection of point x through Fem software.
When i want to optimize it with numerical algorithms, i need derivatie and second derivative of that point, i dont know how to compute it.
If i want to use derivate by difination or Taylor expansion i should define neighberhood, choosing neighberhood need much consideration.
As i understand there should be a way that fmincon use, i want to find magic behind this.

Best Answer

fmincon estimates derivatives automatically by taking finite differences. Your FEM is like a simulation, so be sure to follow the suggestions for finite differences.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation