www.gusucode.com > mbcdata 工具箱 matlab 源码程序 > mbcdata/@cgoppoint/setblocklen.m
function op = setblocklen(op, thiscase) %CGOPPOINT/SETBLOCKLEN Set the block length field when required % % Copyright 2000-2011 The MathWorks, Inc. and Ford Global Technologies, Inc. if nargin < 2 thiscase = ''; end bl = get(op, 'blocklen'); fact_i = 1:length(op.ptrlist); isimported = (op.grid_flag(fact_i)==7); if any(isimported) if strcmp( thiscase,'removedrow' ) % Removed rows from view data AND imported data exists data = get(op, 'Data'); blocklen = size(data ,1); else % Leave the block length alone blocklen = bl; end else % Set the block length to zero blocklen = 0; end op = set(op, 'blocklen', blocklen);