nulltruncate.m

来自「基于matlab的反演程序,用于地球物理勘探中射线追踪及偏移成像程序.」· M 代码 · 共 17 行

M
17
字号
function trimmed=nulltruncate(arraywithnulls)
% 
% NULLTRUNCATE
% 
% trimmed = nulltruncate(arraywithnulls);
%
% This function takes an array, and chops it off at the first occurence of
% a NULL (integer 0). It does NOT call DEBLANK or STRUNPAD.
%
% Chad Hogan, 2004.

% $Id: nulltruncate.m,v 1.3 2004/07/30 21:24:34 kwhall Exp $

nullindex = find(~arraywithnulls);
index = nullindex(1);
trimmed = arraywithnulls(1:index - 1);

⌨️ 快捷键说明

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