|
D.5.10.4 spadd
Procedure from library spectrum.lib (see spectrum_lib).
- Usage:
- spadd(s1,s2); list s1, s2
- Return:
- a list containing the sum of the two spectra s1 and s2
Example:
| LIB "spectrum.lib";
ring r=0,(x,y),ds;
list s1=spectrumnd(x5+x2y2+y5);
s1;
==> [1]:
==> 11
==> [2]:
==> 6
==> [3]:
==> 7
==> [4]:
==> 1,7,9,1,11,13,3
==> [5]:
==> 2,10,10,1,10,10,2
==> [6]:
==> 1,2,2,1,2,2,1
list s2=spectrumnd(x2+y3);
s2;
==> [1]:
==> 2
==> [2]:
==> 1
==> [3]:
==> 2
==> [4]:
==> 5,7
==> [5]:
==> 6,6
==> [6]:
==> 1,1
spadd(s1,s2);
==> [1]:
==> 13
==> [2]:
==> 7
==> [3]:
==> 9
==> [4]:
==> 1,7,5,9,1,11,7,13,3
==> [5]:
==> 2,10,6,10,1,10,6,10,2
==> [6]:
==> 1,2,1,2,1,2,1,2,1
|
|