Home > NoiseTools > nt_mark.m

# nt_mark

## PURPOSE

nt_mark(idx,labels,line_params,text_params)

## SYNOPSIS

function nt_mark(idx,labels,line_params,text_params)

## DESCRIPTION

     nt_mark(idx,labels,line_params,text_params)

## CROSS-REFERENCE INFORMATION

This function calls:

This function is called by:

- nt_split [idx,score_vector,score]=nt_split(x,depth,thresh,guard,minstep) - split time series into intervals
- nt_split_jd [idx,score_vector,todss]=nt_split_dss(x,thresh,depth) - segmentation based on joint diagonalization

## SOURCE CODE

    0001 function nt_mark(idx,labels,line_params,text_params)
    0002 % nt_mark(idx,labels,line_params,text_params)
    0003
    0004
    0005 if nargin<2; labels=[]; end
    0006
    0007 ylim=get(gca,'ylim');
    0008 for k=1:numel(idx)
    0009     line([idx(k) idx(k)],[ylim(1),ylim(1)+0.95*(ylim(2)-ylim(1))], 'color', 'r', 'linestyle', '--');
    0010     if ~isempty(labels)
    0011         if k<= numel(labels) && ~isempty(labels{k});
    0012             text(idx(k), ylim(1)+0.97*(ylim(2)-ylim(1)), labels{k});
    0013         end
    0014     end
    0015 end
    0016 set(gca,'ylim',ylim)