use fminsearch and fzero together
6 views (last 30 days)
Show older comments
ni made veriska
on 28 Feb 2017
Commented: Walter Roberson
on 28 Feb 2017
hello, How to use fminsearch and fzero together, i mean i wanna minimize obj.func but there are some variables that need fsolve first. can it combine? thanks
0 Comments
Accepted Answer
Walter Roberson
on 28 Feb 2017
Yes. The handle you provide to fminsearch can be to a complete function definition that takes whatever computation it needs to determine the value associated with the inputs.
3 Comments
Stephen23
on 28 Feb 2017
@ni made veriska: DO NOT name any function or Mfile min: this will cause shadowing of the inbuilt min function, and prevent that very important function from working.
Walter Roberson
on 28 Feb 2017
Your code shows calling trialp and shows the definition of optp but there is no definition for trialp and no call to optp or the "min" that you show as your first file
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!