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

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

?? psplot.m

?? matlab7 gads工具箱
?? M
字號:
function state = psplot(functions,args,interval,optimvalues,flag)
%PSPLOT Helper function that manages the plot functions.
%   STOP = PSLOT(FUNCTIONS, ARGS,OPTIMVALUES,flag) runs 
%   each of the plot functions.
%
%   This function is private to PFMINLCON, PFMINBND, PFMINUNC.

%   Copyright 2004 The MathWorks, Inc. 
%   $Revision: 1.16.4.2 $  $Date: 2004/03/18 17:59:33 $
persistent plotNo plotNames isNew fig position

state = false;
fname = 'Pattern Search';

if (rem(optimvalues.iteration,interval) ~=0)
    return;
end
if (isempty(functions)) || (strcmpi(flag,'done') ...
    && isempty(findobj(0,'Type','figure','name',fname)))
    return;
end

functions = removeDup(functions);
%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
%determine the layout size in the figure
rows  = ceil(sqrt(length(functions)));
cols  = ceil(length(functions)/rows);
set(0,'CurrentFigure',fig);
set(fig,'CloseRequestFcn',@beforeClose);

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},optimvalues,'init',args{i}{:});
        isNew(i)=false;
        if ~strcmpi(flag,'init')
            state = feval(plotNames{i},optimvalues,flag,args{i}{:});
        end
    else
        state = feval(plotNames{i},optimvalues,flag,args{i}{:});
    end
end

state = gaplotagain(plotNames,args,optimvalues,state,flag);

drawnow
%Check if the figure is still alive
if isempty(findobj(0,'Type','figure','name',fname))
    state = true;
    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 = true;
    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, index] = 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 = false;
    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(plotNames,args,optimvalues,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},optimvalues,'init',args{i}{:});
        set(handle,'DeleteFcn',{@mouseaction,plotNames{i},'remove'});
        
    end
    set(0,'CurrentFigure',fig);
    state = feval(func{i},optimvalues,flag,args{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一区二区三区免费野_久草精品视频
欧美日本一区二区三区四区| 麻豆一区二区三| 久久精品无码一区二区三区| 欧美日韩一区二区欧美激情| 97久久超碰精品国产| 成年人国产精品| av一本久道久久综合久久鬼色| 成人爱爱电影网址| 成人免费视频播放| 99久久99久久综合| 日本丶国产丶欧美色综合| 欧美在线观看一区| 日韩限制级电影在线观看| 日韩女优毛片在线| 欧美激情一区二区三区不卡 | 一片黄亚洲嫩模| 一区二区国产视频| 日韩精品欧美精品| 激情文学综合网| 不卡的av网站| 欧美日韩高清在线| 久久精品视频一区二区| 亚洲免费观看高清完整版在线观看| 亚洲欧洲无码一区二区三区| 亚洲一二三级电影| 国产一区二区三区免费播放| 97久久精品人人做人人爽50路 | 麻豆国产精品777777在线| 国产一区二区日韩精品| 色综合天天综合网天天狠天天| 欧美日韩国产高清一区二区| 久久综合成人精品亚洲另类欧美 | 亚洲一区二区三区在线看| 日本伊人午夜精品| 99精品欧美一区| 精品少妇一区二区三区日产乱码| 欧美国产禁国产网站cc| 亚洲6080在线| 91影院在线观看| 欧美成人在线直播| 亚洲免费在线观看视频| 国产最新精品免费| 欧美人妖巨大在线| 亚洲视频在线观看一区| 蜜桃久久久久久久| 欧美亚洲动漫制服丝袜| 久久日韩粉嫩一区二区三区| 天天影视涩香欲综合网 | 亚洲国产裸拍裸体视频在线观看乱了 | 风间由美性色一区二区三区| 欧美精品一级二级| 亚洲日本va午夜在线电影| 激情综合网av| 3d成人h动漫网站入口| 亚洲美女视频一区| 99国产精品久久| 欧美国产精品一区二区三区| 老司机精品视频导航| 欧美色网站导航| 一区二区三区视频在线观看| 成人精品视频一区| 久久久午夜精品理论片中文字幕| 琪琪一区二区三区| 91.com视频| 亚洲成人在线观看视频| 色综合久久综合网97色综合 | 午夜视频一区二区三区| 色哟哟一区二区| 亚洲欧美日韩国产手机在线| 91视频免费看| 亚洲精品乱码久久久久久日本蜜臀| 国产福利一区在线| 国产人妖乱国产精品人妖| 国产又粗又猛又爽又黄91精品| 日韩天堂在线观看| 精品一区二区三区的国产在线播放 | 国产91丝袜在线播放| 久久精品夜色噜噜亚洲aⅴ| 国产一区91精品张津瑜| 久久久91精品国产一区二区三区| 精品系列免费在线观看| 精品国产百合女同互慰| 国产一区二区精品久久91| 国产亚洲精品资源在线26u| 国产成人一区在线| 国产精品久久精品日日| av高清不卡在线| 亚洲综合色网站| 欧美日韩国产精品成人| 精品一区二区三区香蕉蜜桃| 久久久久久亚洲综合影院红桃| 国产a久久麻豆| 亚洲精品中文在线影院| 欧美日本乱大交xxxxx| 另类欧美日韩国产在线| 日本一区二区成人| 色婷婷激情久久| 日本欧美肥老太交大片| 国产天堂亚洲国产碰碰| 91高清在线观看| 精品一区二区三区av| 国产精品天美传媒沈樵| 欧美三级乱人伦电影| 久久精品国产秦先生| 国产精品白丝在线| 欧美久久一二三四区| 国产精品白丝av| 亚洲一区视频在线| 久久久综合激的五月天| 欧美性大战久久久久久久蜜臀| 蜜臀精品久久久久久蜜臀| 国产精品理伦片| 91精品视频网| 色婷婷精品久久二区二区蜜臀av| 美女尤物国产一区| 亚洲蜜桃精久久久久久久| 日韩午夜激情av| 99视频精品在线| 激情五月婷婷综合| 视频一区视频二区在线观看| 中文字幕av在线一区二区三区| 欧美久久久久免费| 99视频一区二区三区| 国产在线视频一区二区三区| 亚洲成人资源在线| 亚洲同性同志一二三专区| 亚洲精品一区在线观看| 欧美精品aⅴ在线视频| 99r精品视频| 成人免费视频国产在线观看| 久久精品国产亚洲一区二区三区| 亚洲黄色性网站| 成人欧美一区二区三区| 26uuu久久综合| 日韩女优av电影| 欧美理论片在线| 欧美性大战久久久久久久| 成人h动漫精品一区二区| 精品一区二区精品| 日韩精品一级中文字幕精品视频免费观看| 中文字幕一区二区三区av| 国产午夜精品在线观看| 日韩欧美视频一区| 91精品一区二区三区久久久久久| 在线中文字幕一区| 92精品国产成人观看免费| 成人少妇影院yyyy| 粉嫩av一区二区三区| 国产乱码精品一区二区三区五月婷| 日韩av不卡在线观看| 日韩黄色小视频| 日本欧美肥老太交大片| 免费看黄色91| 久久99精品久久久久久| 狠狠色丁香婷婷综合| 国产精品资源在线观看| 国产福利不卡视频| 国产电影一区在线| 成人av电影在线观看| 成a人片国产精品| 91久久精品国产91性色tv | 久久99久久99精品免视看婷婷| 视频一区二区三区中文字幕| 日韩中文字幕区一区有砖一区| 石原莉奈一区二区三区在线观看 | 久久久久久毛片| 国产欧美日产一区| 国产精品视频一二三| 亚洲色图自拍偷拍美腿丝袜制服诱惑麻豆| 亚洲欧洲日韩av| 亚洲一区欧美一区| 日本vs亚洲vs韩国一区三区二区| 久久精品久久精品| 成人99免费视频| 欧美日韩在线精品一区二区三区激情 | 51久久夜色精品国产麻豆| 精品乱人伦小说| 中文字幕精品在线不卡| 亚洲最大成人网4388xx| 麻豆成人综合网| 成人高清视频免费观看| 欧美日本一区二区| 欧美成人伊人久久综合网| 日韩理论片一区二区| 日本伊人色综合网| 国产成人综合精品三级| 在线国产电影不卡| 国产亚洲人成网站| 亚洲不卡av一区二区三区| 国产精品一区二区三区网站| 91久久精品网| 国产亚洲va综合人人澡精品| 亚洲一区在线观看网站| 国产精品一二三四| 欧美剧在线免费观看网站| 久久久91精品国产一区二区精品 | 美女脱光内衣内裤视频久久网站| 成年人国产精品| 精品免费国产二区三区| 亚洲综合一区在线|