good day everyone
I use the matlab toolbox script (ga toolbox). And I want to see the process and result step by step. to see this process or result, I must editing the program of ga.
but, when I already edit and continue to save this program, appear report like that " error writing ga.m...C:\program files\MATLAB\....bla bla bla...acces denied".
how to solved this problem.
thanks

 채택된 답변

Steven Lord
Steven Lord 2022년 1월 25일

1 개 추천

To get information on the progress of the solver change the Display, OutputFcn, and/or PlotFcn options when you call the ga function. You don't need to modify the ga function at all.

댓글 수: 3

kukuh widarsono
kukuh widarsono 2022년 1월 25일
thanks steven, but, I meant I want to see the step of programe not result of GA that it can see use plot funtion ect.
I modify ga function just remove (;) to see result in this step, not add new script.
thanks
Steven Lord
Steven Lord 2022년 1월 26일
I strongly recommend against modifying functions written by MathWorks. A change you think should be harmless (or that you make accidentally) could make the function stop working or make it return incorrect results.
If you need to see the process that the function follows you could set a breakpoint in the function and use the debugging capabilities to trace the execution. That would let you look at variables without making permanent changes to the file. This won't work for built-in functions for which we don't distribute the source code, but if I recall correctly ga is implemented as a regular MATLAB function file.
kukuh widarsono
kukuh widarsono 2022년 1월 27일
yes, thanks Steve...I was found the solution of this. I copy all fin folder optimization in drive C...hehehe. and It can be done.
thanks you very much Steve.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Environment and Settings에 대해 자세히 알아보기

질문:

2022년 1월 25일

댓글:

2022년 1월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by