필터 지우기
필터 지우기

Can I use "xxx.m" file for object function in GA tool

조회 수: 13 (최근 30일)
SeungJu Choi
SeungJu Choi 2021년 10월 26일
댓글: SeungJu Choi 2021년 10월 27일
Now I'm trying to binary optimization using GA tool,
I saw 'doc GA' that is support by MATLAB, but there are only use function handle like 'y=@(x) x+1'.
So, I want to know that can use .m file for object function in GA tool.
And can you tell me an example of GA tool used with Finie element method?
in 'doc GA', I can't found that example.
I think it will probably help me for use GA tool.

답변 (1개)

Alan Weiss
Alan Weiss 2021년 10월 26일
Please report the MATLAB version you are using, such as R2019a. It makes a difference, because, for example, the Optimization app has been removed from the latest MATLAB versions.
Please also explain what you mean by "GA tool." Do you mean the Optimization app, the thing you get by running the command optimtool? Or do you mean the ga command at the MATLAB command line? Or do you mean the Optimization app that you get by running gatool?
To answer your question, yes of course you can use a .m file as a fitness function for ga. For an example, see Minimize Rastrigin's Function, which uses a .m file representing Rastrigin's function as the fitness function.
I know of no example using ga to optimize a finite element method computation, sorry.
Alan Weiss
MATLAB mathematical toolbox documentation
  댓글 수: 1
SeungJu Choi
SeungJu Choi 2021년 10월 27일
The "GA tool" mentioned above is the ga of opimization app.
I will try input the object fuction use .m file because you said can use.
Thank you so much for your help.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Problem-Based Optimization Setup에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by