fminsearch using multiple non-variable parameters

I am trying to optimize several variables e.g. relative source-receiver positions, etc. The optimization is using a large data set of time signatures. Since reading in the signature takes almost 1 minute, it is not realistic to read the files in within the function to be optimized.
Beside the large dataset I require some additional non-variable parameters to pass on that required for the calcuations.
The help file fminsearch is not clear how I can do this!
Basically I want to optimize:
myfun(receiver_pos_vec,source_pos_vec,large_data_set,frequency_vec,data_set_size)
in which only the first two are variables to be optimized.

回答 (1 件)

Matt J
Matt J 2014 年 5 月 7 日

0 投票

See this page. Global variables are not the preferred solution. Either anonymous or nested functions is what you want.

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

製品

タグ

質問済み:

2014 年 5 月 7 日

回答済み:

2014 年 5 月 7 日

Community Treasure Hunt

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

Start Hunting!

Translated by