www.gusucode.com > mbcmodels 工具箱 matlab 源码程序 > mbcmodels/@localmulti/checkdata.m
function [Xf,Yf,OK,badIndex]= checkdata(L,X,Y) %CHECKDATA check X and Y data for fitting % % [Xf,Yf,OK,badIndex]= checkdata(L,X,Y); % Copyright 2000-2006 The MathWorks, Inc. and Ford Global Technologies, Inc. % code outer model Xd= code(L,double(X)); Yd= ytrans(L,double(Y)); X(:,1:end)= Xd; % use current model to check data transform m= get(L,'currentmodel'); [Xd,Yd,DataOK] = checkdata(m,Xd,Yd); badIndex = ~DataOK; % select good data Yf= Y(DataOK,1); Xf= X(DataOK,:); % see if whole sweeps removed by this check OK= ismember(testnum(Y),testnum( Yf ));