www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgtabgradconstraint/private/pScaleAxisPoints.m
function scaledAxis = pScaleAxisPoints(obj, pts) %PSCALEAXISPOINTS Scale axis points % % SCALEDAXIS = PSCALEAXISPOINTS(OBJ, PTS) scales the 1-by-NAXIS cell % array of axis points, PTS. The axis breakpoints in OBJ are scaled to % [0, 1] and PTS are mapped onto this scale. % % See also PGETDG % Copyright 2006 The MathWorks, Inc. NRUN = size(pts{1}, 1); NAXIS = length(obj.pAxisVariables); scaledAxis = pts; for i = 1:NAXIS Points_i= pts{i}; Axi= obj.AxisBreakpoints{i}; sc= scaledAxis{i}; for j = 1:NRUN sc(j, :) = (Points_i(j, :)-Axi(1))/... (Axi(end)-Axi(1)); end scaledAxis{i}= sc; end