www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@xregdesign/gui_sort.m

    function [dout,ok]=gui_sort(des)
%GUI_SORT GUI for sorting design points
%
%   [D,OK] = GUI_SORT(D) uses the gui function UISORTDATA to sort the
%   factor settings in D.  OK indicates whether the user pressed OK or
%   Cancel (ie whether the design has been changed or not).

%  Copyright 2000-2009 The MathWorks, Inc. and Ford Global Technologies, Inc.


fs = factorsettings(des);

nosort = false;
if isempty(fs)
    fs = zeros(1,nfactors(des));
    nosort = true;
end

[~, ord, ok] = uisortdata(fs,factors(des));

if ~nosort && ok
    des=reorder(des,ord);
end

dout=des;