function f=relbwN(N,s,parms) % % Forms a sum of N relativistic Breit-Wigner resonance forms % % The first three parameters are the coupling, mass, and width of BW #1 f=relbw(s,parms(1),parms(2),parms(3)); % % The remaining BW's have a phase first, then the other three parameters if (N>1) for k=2:N l=4+4*(k-2); f=f+exp(i*parms(l))*relbw(s,parms(l+1),parms(l+2),parms(l+3)); end end