for i = [1 10 100 2 20 200 3 30 300 4 40 400 5 50 500 6 60 600 7 70 700 8 80 800]
[row,col]=cellfun(@(s) find(s==i),gait_events_cut_inter,'uni',false);
%row = cellfun(@(s) round(mean(s)),row,'uni',false);
%or
row = cell2mat(cellfun(@(s) round(mean(s)),row,'uni',false));
order = floor(single(log(i)./log(10)));
if order==2
i=i/100;
e=3;
elseif order ==1
i=i/10;
e=2;
else
i=i;
e=1;
end
for j=1:3
if e>1 & isnan(row(j))
continue
else
gait_events_inter{j}{i,1}(e,1)=row(j);
end
end