I am trying to access the first and last number in a cell array. More specifically I need the first and last X value to see how much displacement there is. I am importing a trackmate file, which is why I've added the trackmate script below (hoping it might be of some help).
The script below is the one I use; I work on a mac
addpath('/Applications/Fiji.app/scripts')
clipZ = true;
scaleT = true;
[tracks] = importTrackMateTracks('8Tracks.xml', clipZ, scaleT);
n_tracks = numel( tracks );
tracks{:,:,:};
% tracks = IMPORTTRACKMATETRACKS(file) opens the track file 'file' and
% returns the tracks in the variable 'tracks'. 'tracks' is a cell array,
% one cell per track. Each cell is made of 4xN double array, where N is the
% number of spots in the track. The double array is organized as follow:
% [ Ti, Xi, Yi, Zi ; ...] where T is the index of the frame the spot has been
% detected in. T is always an integer. X, Y, Z are the spot spatial
% coordinates in physical units.