mep: a pedestrian vector index list creator

버전 1.0.0.0 (2.17 KB) 작성자: us
Creates epochs (0|1) in a logical array according to a list of indices (begin:end).
다운로드 수: 6.5K
업데이트 날짜: 2003/5/21

라이선스 보기

creates - completely vectorized - a logical array/vector <lvec> with epochs/intervals set to <1|TRUE> according to a list of indices of the form:
begin = [b1 b2 ... bN]
end = [e1 e2 ... eN]
where <b>s and <e>s may overlap or be included within each other.
lvec=[b1:e1 b2:e2 ... bN:eN]
itself can be used to retrieve/assign values from a numerical construct, eg,
vec(1,2,lvec)=nan;

help mep
vix = mep(v,ixb,ixe)
vix = mep(v,[ixb;ixe])
to create epochs

returns in VIX a <logical> array with epochs set to
true: ixb(1)->ixe(1) ... ixb(N)->ixe(N)
false: otherwise
correctly handles epoch overlaps/inclusions/reversals

v: vector (to size VIX, is not changed)
ixb: list of indices BEGIN epoch
ixe: list of indices END epoch

% examples
z=zeros(1,10);
vix=mep(z(1,:),[1 5],[3 10]);
z(1,vix)=1
% 1 1 1 0 1 1 1 1 1 1
z=zeros(1,10);
vix=mep(z(1,:),[2 3 2 6 9],[2 3 4 7 10]);
z(1,vix)=1
% 0 1 1 1 0 1 1 0 1 1
z='----------';
vix=mep(z,[[1 3 6];[4 4 8]]);
z(vix)='+'
% ++++-+++--

인용 양식

us (2024). mep: a pedestrian vector index list creator (https://www.mathworks.com/matlabcentral/fileexchange/2479-mep-a-pedestrian-vector-index-list-creator), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R13
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.0.0.0

enhanced help