Hi Mingkuan,
It's pretty straightforward. Use the load_tracks script to load the
data from a .mat file, then write your own short script to calculate
the distance traveled by each fly. Something like this:
trx = load_tracks;
n_flies = length( trx );
distances_walked = zeros( 1, n_flies );
for fly = 1:n_flies
dX = sqrt( diff( trx(fly).x ).^2 + diff( trx(fly).y ).^2 ); % Pythagoras
distances_walked(fly) = sum( dX );
end
JB