⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delsamps.m

📁 PLS_Toolbox是用于故障检测与诊断方面的matlab工具箱
💻 M
字号:
function eddata = delsamps(data,samps)
%DELSAMPS Deletes samples (rows) from data matrices.
%  Inputs are the original data matrix (data) and
%  the row numbers of the samples to delete (samps).
%  The output is the edited data matrix (eddata).
%
%I/O: eddata = delsamps(data,samps); 
%
%  This function can also be used to delete variables
%  (columns) by operating on the matrix transpose, i.e.
%
%I/O: eddata = delsamps(data',vars)';
%
%See also: shuffle, specedit

%Copyright Eigenvector Research, Inc. 1996-98
%Modified 11/93, 1/96

[m,n]    = size(data);
[ms,ns]  = size(samps);
if ms>ns
  samps  = samps';
  ns     = ms;
end
samps    = sort(samps);
savsamps = 1:m;
savsamps(samps) = zeros(1,ns);
savsamps = find(savsamps ~= 0);
eddata   = data(savsamps,:);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -