EEG_POINT2LAT Convert latency in data points to latency in ms relative to the time locking. Used in eeglab().

Usage: >> [newlat ] = eeg_point2lat( lat_array, [], srate);
>> [newlat ] = eeg_point2lat( lat_array, epoch_array, srate, timelimits, timeunit);

Inputs:
lat_array   
latency array in data points assuming concatenated data epochs (see eeglab() event structure)
epoch_array   
epoch number corresponding to each latency value
srate   
data sampling rate in Hz
timelimits   
[min max] timelimits in 'timeunit' units (see below)
timeunit   
time unit in second. Default is 1 = seconds.

Outputs:
newlat   
converted latency values (in 'timeunit' units) for each epoch

Example: eeg_point2lat( [ EEG.event.latency ], [], EEG.srate);
% returns the latency of all events in second for a continuous
% dataset EEG
eeg_point2lat( [ EEG.event.latency ], [ EEG.event.epoch ],
EEG.srate, [EEG.xmin EEG.xmax]*1000, 1E-3);
% returns the latency of all events in millisecond for a dataset
% containing data epochs.

Author: Arnaud Delorme, CNL / Salk Institute, 2 Mai 2002

See also: eeg_lat2point, eeglab(), pop_editieventvals(), pop_loaddat()

See the matlab file eeg_point2lat.m (may require other functions)

Back to functions