function[newiloc,newival]=CreateNewTrack(iftloc,iftval, ...
previousiloc,previousival,nSines,MinMag);
% function[newiloc,newival]=CreateNewTrack(iftloc,iftval, ...
% previousiloc,previousival,nSines,MinMag);
%
%==> creation of a new track by looking for a new significant
% peak not already tracked
% data: iftlov, iftval: bin number & magnitude of peaks detected
% previousiloc,
% previousival: idem for previous peaks detected
% nSines: number of sines
% MinMag: minimum magnitude (-100 dB) for
% 0 amplitude
%--- removing peaks already tracked
for i=1:nSines
[minim, ind] = min(abs(iftval - previousival(i)));
iftval(ind) = MinMag;
end
%--- keeping the maximum
[newival, ind] = max(iftval);
newiloc = iftloc(ind);