fminconまたはfminsearchの引数 funの書き方について
Show older comments
simulinkでMATLAB function ブロックを用いてx(w)とy(w)を用いて、目的関数(x -y)^2が最小となるようなwを求めたいです。このときfminsearch関数を用いるかと思いますが、この関数の引数であるfunの定義の仕方がわかりません。 fun = @(x,y) (x - y)^2としていいのでしょうか? x,yはともにwの関数なので fun = @(w)... としたいところですが、複雑になるのでMATLAB function ブロックの入力であるx, yの関数として定義したいです。 うまいやり方ご存知の方いらっしゃいましたらご回答よろしくお願いいたします。
Accepted Answer
More Answers (1)
Kimiyasu Sasaki
on 20 Sep 2019
0 votes
Categories
Find more on Simulink Design Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!