Я нашел способ, но он не очень интуитивен, и цвет легенды не обновляется с цветом строки обновления ...
Возможно, лучшим способом будет получить ответ системы и добротуподбора, позвонив по номеру
[y_sys,fit,~] = compare(z1, sys);
и нанесите на график эти результаты самостоятельно (см. документы ).
% load sample data and system
load iddata1 z1;
sys = tfest(z1,3);
% give the tf system a name
tf_name = 'system';
sys.Name = tf_name;
% compare in figure
fig = figure(1); clf;
compare(z1,sys)
% get handle for line of system
children = get(gca, 'Children');
grp = findobj(children, '-regexp', 'DisplayName', tf_name); % use system.Name here!
l = grp.Children; % handle to line object
% get old color
color_old = l.Color; % same as output of 'lines(1)' when using default colors
% find all lines with color
ls = findobj(fig, 'Color', color_old);
% set new color
set(ls, 'Color', [219/256 134/256 7/256])