Hi, I am using app designer with gamultiobj function to solve an optimization problem with 2 objectives.
I have modified @gaplotpareto.m to display at desired UIAxes.
But when runing the app designer function that calls the optimization, it stops because does not identify the function in bold:
function state = gaplotpareto1(app,options,state,flag)
%GAPLOTPARETO1 Plots a Pareto front for first two objectives.
%
%if nargin < 4 || isempty(objectivesToPlot)
objectivesToPlot = [1 2];
%end
markers = {'og','pm','sb','dk','hr','xc'};
subPops = populationIndices(options.PopulationSize);
[~,c] = size(subPops);
for i = 1:c
pop = subPops(:,i);
range = pop(1):pop(2);
tag = ['gaplotPareto',int2str(i)];
app.plotFirstFront(state.Score(range,:),state.Rank(range),markers{1 + mod(i,5)},objectivesToPlot(:)',flag,tag);
hold(app.UIAxes4,"on")
end
title(app.UIAxes4,'Pareto front','interp','none')
hold(app.UIAxes4,"off")
end
subPops = populationIndices(options.PopulationSize);
I have sougt the function in matlab documentation, but I could not find anything about this function.
As an alternative, do you have other alternative to display pareto in a desired UIAxes inside App Designer while running optimization?
Thank you!
Best Answer