亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? gaplot.m

?? matlab7 gads工具箱
?? M
字號:
function state = gaplot(FitnessFcn,options,state,flag)
%GAPLOT Helper function that manages the display functions.
%   STATE = GAPLOT(FitnessFcn, options, state, flag) runs each of the graph
%   functions in the options.GraphFcns cell array.
%
%   This function is private to GA and is called between each generation.

%   Copyright 2004 The MathWorks, Inc. 
%   $Revision: 1.11.4.2 $  $Date: 2004/03/18 17:59:31 $

persistent plotNo plotNames isNew fig position

if (rem(state.Generation,options.PlotInterval) ~=0)
    return;
end
functions = options.PlotFcns;
fname = 'Genetic Algorithm';
if (isempty(functions)) || (strcmpi(flag,'done') ...
    && isempty(findobj(0,'Type','figure','name',fname)))
    return;
end
functions = removeDup(functions);
args = options.PlotFcnsArgs;

%Called with 'init' flag or the figure is not present
if(strcmp(flag,'init')) || isempty(findobj(0,'Type','figure','name',fname))
    fig = findobj(0,'type','figure','name',fname);
    if isempty(fig)
        fig = figure('visible','off');
        if ~isempty(position) && ~strcmpi(get(fig,'WindowStyle'),'docked')
            set(fig,'Position',position);
        end
    end
    set(0,'CurrentFigure',fig);
    clf;
    set(fig,'DoubleBuffer','on','numbertitle','off','name',fname, ...
        'userdata',[],'DockControls','off','Renderer','painters');
    %Initialize the persistent variables
    plotNo = []; plotNames = [];isNew = []; 
    [plotNames, args, plotNo, isNew] = updatelist(plotNames, plotNo, ...
        functions, args, fig, 'init');
   
    %Give a stop button in the figure
    uicontrol('string','stop','callback',@buttonStop);
    shg
end
set(0,'CurrentFigure',fig);
set(fig,'CloseRequestFcn',@beforeClose);
%determine the layout size in the figure
rows  = ceil(sqrt(length(functions)));
cols  = ceil(length(functions)/rows);


if change_runtime(functions,plotNames)
    [plotNames, args, plotNo, isNew] = updatelist(plotNames, plotNo, ...
        functions, args, fig, '');
end

if all(isNew)
    mouseaction([],[],[],'init');
end
% call each plot function
for i = 1:length(plotNames)
    handle = subplot(rows,cols,plotNo(i));
    if isNew(i)
        set(handle,'ButtonDownFcn',{@mouseaction,plotNames{i},'add'});
        %Do not delete the replace my axis (which is the default settings)
        set(handle,'NextPlot','replacechildren');
        state = feval(plotNames{i},options,state,'init',args{i}{:});
         isNew(i)=false;
        %If in the middle of itertions, call with the regular 'flag' too.
        if ~strcmpi(flag,'init')
            state = feval(plotNames{i},options,state,flag,args{i}{:});
        end
    else
           state = feval(plotNames{i},options,state,flag,args{i}{:});
      end
end

state = gaplotagain(FitnessFcn,plotNames,args,options,state,flag);

drawnow
%Check if the figure is still alive
if isempty(findobj(0,'Type','figure','name',fname))
    state.StopFlag = 'stop requested.';
    return;
end
%Remember the position
position = get(fig,'Position');
%If any button was pressed, handle that
set(fig,'CloseRequestFcn','closereq');
if(strcmpi('stop',getappdata(fig,'data')))
    state.StopFlag = 'stop requested.';
    setappdata(fig,'data','')
    return;
end

%-------------------------------------------------------
%UPDATELIST updates the function list and plot numbers
%-------------------------------------------------------
function [plotNames, fcnArgs, plotNo, isNew] = updatelist(plotNames,plotNo,functions,args,fig,flag)

if strcmpi(flag,'init')
    plotNames = functions;
    plotNo   = 1:length(functions);
    isNew = true(length(plotNames),1);
    fcnArgs = args;
    return;
end

%determine the layout size in the figure
rows = ceil(sqrt(length(functions)));
cols = ceil(length(functions)/rows);
%what was the layout size before
rows1 = ceil(sqrt(length(plotNames)));
cols1 = ceil(length(plotNames)/rows1);

set(0,'CurrentFigure',fig);
fcnArgs = cell(1,length(plotNames));
isNew = false(length(plotNames),1);
to_delete = false(length(plotNames),1);
%Check if any of plotNames is not in functions;remove such entries
for i = 1:length(plotNames)
    [found, index] = foundfunc(plotNames{i},functions);
    if ~found
        delete_this = subplot(rows1,cols1,plotNo(i));
        delete(delete_this);
        to_delete(i) = true;
    else
        fcnArgs(i) = args(index(1));   
    end
end
%delete the plot names which are not in functions
plotNames(to_delete) = []; plotNo(to_delete) = []; 
isNew(to_delete) = []; fcnArgs(to_delete) = [];

%Now, add all new entries of functions in plotNames
for i = 1:length(functions)
    found = foundfunc(functions{i},plotNames);
    if ~found
        plotNames(end+1) = functions(i);
        fcnArgs(end+1) = args(i);
        isNew(end+1) = true;
        plotNo(end+1) = 0; 
    end
end

%Determine the plot numbers
if rows1 == rows && cols1 == cols
    %Binary search and replacement
    for i = 1:length(plotNames)
        if plotNo(i) == 0 
            for j = 1:rows*cols
                if ~any(j == plotNo)
                    plotNo(i) = j;
                end
            end
        end
    end
elseif rows1 > rows || cols1 > cols
    %find position of all existing axes and shift them
    for i = length(plotNames):-1:1
        if plotNo(i) ~=0
            subplot(rows1,cols1,plotNo(i))
            %plotNo(i) = i;
        else
            plotNo(i) = i;
            subplot(rows1,cols1,plotNo(i))
        end
        plotNo(i) = i;
        subplot(rows,cols,plotNo(i),gca);
        
    end
elseif rows1 < rows || cols1 < cols
    for i = 1:length(plotNames)
        if plotNo(i) ~=0
            subplot(rows1,cols1,plotNo(i))
            %plotNo(i) = i;
        else
            plotNo(i) = i;
            subplot(rows,cols,plotNo(i))
        end
        subplot(rows,cols,plotNo(i),gca);
    end
    
end

%-----------------------------------------------------------
%CHANGE_RUNTIME return a boolean if two cell arrays are same or not
%-----------------------------------------------------------
function bool = change_runtime(functions,plotNames)
bool = false;    
    for i = 1:length(functions)
        if ~foundfunc(functions{i},plotNames)
            bool = true;
        end
    end
    
    for i = 1:length(plotNames)
        if ~foundfunc(plotNames{i},functions)
            bool = true;
        end
    end

%-----------------------------------------------------------
%REMOVEDUP remove the duplicate entries in a cell array of function handle
%-----------------------------------------------------------
function functions = removeDup(functions)
i = 1;
while i <= length(functions)
      [found,index] = foundfunc(functions{i},functions);
      if found 
        functions(index(1:end-1)) = [];
    end
    i = i+1;
end

%-------------------------------------------------------------------------
%FOUNDFUNC Finds if STR is in FUNCNAMES, returns a boolean and index
%-------------------------------------------------------------------------
function [bool,index] = foundfunc(str,funcNames)

bool = false;
index = 0;
for i = 1:length(funcNames)
    if strcmpi(func2str(str),func2str(funcNames{i}))
        bool = true;
        if nargout > 1
            index(end+1) = i;
        end
    end
end
index(1) = [];
%-----------------------------------------------------------
%BUTTONSTOP callback for uibutton 'stop'
%-----------------------------------------------------------
function buttonStop(unused,unused2)
setappdata(gcf,'data','stop');

%-----------------------------------------------------------
%BUTTONDOWNACTION maintain a list of all the plot whose ButtondownFcn 
%callback or DeleteFcn is executed.
%-----------------------------------------------------------
function [done, func] = mouseaction(obj,eventdata,Name,what)

persistent list
done = false;
func = [];
switch lower(what)
    case 'length'
        if ~isempty(list)
            done = true;
        else 
            done = false;
        end
    case 'init'
        list = [];
        done = true;
    case 'add'
        if isempty(list)
            list{1} = Name;
        elseif ~foundfunc(Name,list);
            list{end+1} = Name;
            done = true;
        end
        fig = findobj(0,'type','figure','name',value2RHS(Name));
        if ~isempty(fig)
            close(fig);
        end
    case 'remove'
        if ~isempty(list)
          [found,index] = foundfunc(Name,list);
            if found
                list(index) = [];
                done = true;
            end
        end
end
func = list;

%-----------------------------------------------------------
%GAPLOTAGAIN plots all the functions whose ButtondownFcn has been
%called.
%-----------------------------------------------------------
function state = gaplotagain(FitnessFcn,plotNames,args,options,state,flag)

[foundAny, func] = mouseaction([],[],[],'length');
if ~foundAny
    return;
else
    to_delete = false(1,length(func));
    fcnArgs = cell(1,length(func));
    for i = 1:length(func)
        [found, index] = foundfunc(func{i},plotNames);
        if ~found
            to_delete(i) = true;
        else
            fcnArgs(i) = args(index(1));
        end
    end
    %delete the plot names which are not in functions
    func(to_delete) = [];  fcnArgs(to_delete) = [];
end

% call each plot function
for i = 1:length(func)
    fname = value2RHS(func{i});
    fig = findobj(0,'type','figure','name',fname);
    %Called with 'init' flag or the figure is not present
    if isempty(fig)
        fig = figure;
        set(fig,'DoubleBuffer','on','numbertitle','off','name',fname, ...
            'userdata',[],'Renderer','painters');
        handle = figure(fig);
        set(gca,'NextPlot','replacechildren');
        state = feval(func{i},options,state,'init');
        set(handle,'DeleteFcn',{@mouseaction,plotNames{i},'remove'});
    end
    set(0,'CurrentFigure',fig);
    state = feval(func{i},options,state,flag,fcnArgs{i}{:});
    set(gcf,'DeleteFcn',{@mouseaction,func{i},'remove'});
end

%-----------------------------------------------------------
%BEFORECLOSE CloseRequestFcn for main figure window
%-----------------------------------------------------------
function beforeClose(obj,event)

msg = sprintf('%s\n%s','YES will stop the solver (if running) and close the figure.',...
                           'NO will cancel this request.');
handle = questdlg(msg,'Close dialog', 'YES','NO','NO');
switch handle
    case 'YES'
        delete(obj)
    case 'NO' 
        return;
    otherwise
        return;
end
%-------------------------------------------------------------------------


?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91蝌蚪porny九色| 91婷婷韩国欧美一区二区| 国产精品色哟哟| 88在线观看91蜜桃国自产| 成人黄色免费短视频| 九九热在线视频观看这里只有精品| 综合久久久久久久| 精品国产一区二区三区忘忧草 | 在线成人av影院| 菠萝蜜视频在线观看一区| 激情六月婷婷久久| 视频一区二区三区在线| 亚洲精品国产一区二区精华液 | 99这里只有久久精品视频| 麻豆视频一区二区| 亚洲mv在线观看| 亚洲精品免费在线| 国产精品伦理在线| 中文字幕成人av| 国产目拍亚洲精品99久久精品| 日韩精品一区二区在线观看| 欧美美女黄视频| 亚洲欧美日韩小说| 亚洲欧洲精品天堂一级| 国产午夜亚洲精品理论片色戒 | 午夜视频在线观看一区二区三区| 自拍偷自拍亚洲精品播放| 久久久精品国产免大香伊| 欧美成人vr18sexvr| 91精品国产黑色紧身裤美女| 欧美日韩三级一区| 欧美在线三级电影| 欧美在线你懂的| 欧美色电影在线| 欧美精品一卡二卡| 欧美一区二区三区免费在线看 | 91丨九色丨蝌蚪富婆spa| 成人av在线资源网站| 风间由美一区二区三区在线观看 | 欧美tickling网站挠脚心| 91精品国产品国语在线不卡| 欧美一区二区在线免费播放| 欧美精品久久一区| 欧美一激情一区二区三区| 日韩免费性生活视频播放| 日韩欧美国产一二三区| 久久亚洲私人国产精品va媚药| 精品国产电影一区二区| 久久综合狠狠综合久久综合88 | 国产麻豆欧美日韩一区| 国产一区二区三区av电影| 国产91对白在线观看九色| 99视频国产精品| 欧美性极品少妇| 精品美女被调教视频大全网站| 久久嫩草精品久久久久| 国产精品无圣光一区二区| 亚洲激情成人在线| 日韩av电影天堂| 国产一区二区三区四| 成人av片在线观看| 日本高清成人免费播放| 777奇米成人网| 久久精品亚洲精品国产欧美kt∨ | 亚洲人成网站在线| 亚洲午夜激情av| 久久se精品一区精品二区| 高清国产午夜精品久久久久久| 99久久伊人久久99| 91精品国产91久久久久久最新毛片| 久久9热精品视频| 国产传媒日韩欧美成人| 日本国产一区二区| 日韩欧美你懂的| 亚洲欧洲一区二区三区| 亚洲成人三级小说| 国产福利不卡视频| 欧美中文字幕久久| 久久久精品中文字幕麻豆发布| 亚洲色图欧美在线| 美女视频网站久久| 99国产精品国产精品毛片| 6080国产精品一区二区| 中文字幕免费在线观看视频一区| 性做久久久久久| 成人免费观看男女羞羞视频| 欧美日韩精品三区| 国产精品福利影院| 韩国成人精品a∨在线观看| 在线看国产一区二区| 国产欧美一区二区精品秋霞影院| 亚洲成av人片观看| 成人福利视频网站| 欧美成人欧美edvon| 亚洲国产一区二区视频| 国产成人综合视频| 日韩欧美精品在线视频| 一区二区免费看| 成人av动漫在线| 精品美女在线播放| 日韩电影一区二区三区四区| 成人app软件下载大全免费| 欧美成人一区二区三区在线观看| 亚洲夂夂婷婷色拍ww47| 成人国产精品免费| 久久久久国产精品人| 看国产成人h片视频| 欧美日韩不卡一区二区| 亚洲精品午夜久久久| 成人av电影在线播放| 欧美精品一区二区三| 日韩激情一区二区| 欧美影院午夜播放| 亚洲激情校园春色| 99v久久综合狠狠综合久久| 久久久99精品久久| 精品一区免费av| 制服丝袜一区二区三区| 天天影视涩香欲综合网| 欧美日韩电影在线| 亚洲二区在线视频| 在线中文字幕一区| 亚洲午夜激情网页| 欧美日韩一区在线| 爽好多水快深点欧美视频| 欧美丝袜丝nylons| 亚洲丶国产丶欧美一区二区三区| 欧美综合一区二区三区| 亚洲一区中文日韩| 欧美日韩一区成人| 亚洲高清视频的网址| 欧美日韩中文字幕一区| 亚洲夂夂婷婷色拍ww47 | 日韩亚洲欧美一区| 日本网站在线观看一区二区三区| 欧美丰满一区二区免费视频 | 91成人在线精品| 亚洲制服丝袜av| 7777精品伊人久久久大香线蕉经典版下载 | 在线综合亚洲欧美在线视频| 亚洲一区二区三区三| 91免费在线视频观看| 亚洲一区二区在线免费观看视频 | 国产电影一区在线| 国产精品欧美一区二区三区| 菠萝蜜视频在线观看一区| 亚洲美女屁股眼交3| 欧美性高清videossexo| 天天影视涩香欲综合网| 欧美不卡一二三| 成人免费av资源| 一区二区三区中文字幕电影| 欧美丰满嫩嫩电影| 久久草av在线| 国产精品久久久久精k8| 在线观看日韩电影| 日本麻豆一区二区三区视频| 久久久精品国产99久久精品芒果 | 成人久久视频在线观看| 亚洲精品日产精品乱码不卡| 717成人午夜免费福利电影| 韩国精品主播一区二区在线观看| 中文字幕精品三区| 欧美私模裸体表演在线观看| 精品一区二区成人精品| 中文字幕一区二区视频| 欧美片网站yy| 国产精品影视在线观看| 亚洲激情五月婷婷| 精品国一区二区三区| 99riav久久精品riav| 日本中文字幕一区| 国产精品天美传媒| 欧美丰满一区二区免费视频 | 久久99精品视频| 亚洲精品中文字幕乱码三区| 日韩精品一区二| 色综合久久中文综合久久牛| 看片网站欧美日韩| 一区2区3区在线看| 久久久久久久综合狠狠综合| 在线视频你懂得一区二区三区| 黑人巨大精品欧美一区| 一区二区三区四区在线| 久久久99精品免费观看不卡| 欧美日韩一区二区在线观看视频| 国产精品1区2区3区| 亚洲国产精品一区二区尤物区| 久久免费美女视频| 欧美乱熟臀69xxxxxx| caoporn国产一区二区| 美女视频黄 久久| 一区二区三区在线免费视频| 久久亚洲一级片| 91麻豆精品国产综合久久久久久 | 成人视屏免费看| 免费在线一区观看| 一区二区三国产精华液| 国产精品网站在线播放| 久久综合av免费|