フィルターのクリア

pass double symbolic expression to paretosearch

2 ビュー (過去 30 日間)
Davide Di Luzio
Davide Di Luzio 2022 年 2 月 21 日
編集済み: Walter Roberson 2022 年 2 月 24 日
hi at all.
need to pass two symbolic expression that i must try to minimize with pareto search.
with matlabFunction i turn the symbolic expression to matlab numeric function but there is no way to pass this two function to paretosearch.
Can anyone please help me with simple example?
i reproduce it for me .
thank at all

採用された回答

Alan Weiss
Alan Weiss 2022 年 2 月 23 日
It depends on how you created your symbolic expressions.
  • If you have two expressions, say obj1 and obj2, then two runs of matlabFunction returns two function handles, say funobj1 and funobj2. You can pass these to paretosearch by using the handle
twoobj = @(x)[funobj1(x),funobj2(x)];
sol = paretosearch(twoobj,2,...))
  • If you have a 2-D row vector output to your objective function named obj, then matlabFunction returns a function handle funobj that is all ready for paretosearch:
sol = paretosearch(funobj,2,...)
If this doesn't work for you, please ask again with more detail, such as exactly which size inputs and outputs your functions expect, how you call matlabFunction, and how you call paretosearch.
Alan Weiss
MATLAB mathematical toolbox documentation
  7 件のコメント
Walter Roberson
Walter Roberson 2022 年 2 月 23 日
編集済み: Walter Roberson 2022 年 2 月 24 日
It is not clear what error you are encountering?
[obj1, obj2] for symbolic expressions obj1 and obj2 simply creates a row vector of the two expressions. When you matlabFunction the results, MATLAB would create an anonymous function that built a row vector of results. (In some cases you need a column vector, in which situation use [obj1;obj2]
Davide Di Luzio
Davide Di Luzio 2022 年 2 月 23 日
thx at all

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSymbolic Math Toolbox についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by