www.gusucode.com > mbcdesign 工具箱 matlab 源码程序 > mbcdesign/@cset_pointset/private/scaleToLimits.m
function X = scaleToLimits(obj, X) %SCALETOLIMITS Scale a matrix from [0 1] to the current limits % % X = SCALETOLIMITS(OBJ, X) scales the values in X from being in the [0 1] % domain to the current candidate set limits. % Copyright 2007 The MathWorks, Inc. Lims = limits(obj.candidateset); Range = diff(Lims,1,2)'; for n = 1:size(X, 2) X(:,n) = Lims(n,1) + X(:,n).*Range(n); end