Big Chemical Encyclopedia

Chemical substances, components, reactions, process design ...

Articles Figures Tables About

Using the fminsearch Function

In MATLAB the fminsearch function is used to find the minimum of a function of several variables. You first create an m-file that calculates the function, and then invoke the fminsearch function to minimize it. [Pg.49]

Step 1 To solve the same problem, create a slightly different m-file and call it probS.m. You can do this most easily by opening prob2.m, changing it, and saving it with the new name probS.m.  [Pg.49]

Step 2 Check the function as you did before. In fact, because you already checked the m-file prob2.m you only have to check that y2 is calculated correctly from fi anAf2. The command is invoked by first setting the initial guess (this also sets the length of the vector of independent variables, i.e. it tells MATLAB how many parameters it has to adjust)  [Pg.49]

These values agree with the manual calculations, so the functions are computed correctly. [Pg.49]

Step 3 Next, replace the in the m-file and run the problem from an initial guess [Pg.49]


Step 3 The minimum of value is found using the fminsearch function ... [Pg.306]


See other pages where Using the fminsearch Function is mentioned: [Pg.49]   


SEARCH



Fminsearch

© 2024 chempedia.info