comparison scripts/elfun/lcm.m @ 2311:2b5788792cad

[project @ 1996-07-11 20:18:38 by jwe]
author jwe
date Thu, 11 Jul 1996 20:18:38 +0000
parents 5cffc4b8de57
children 204cc7db6f4a
comparison
equal deleted inserted replaced
2310:e2a8f216373d 2311:2b5788792cad
15 ### You should have received a copy of the GNU General Public License 15 ### You should have received a copy of the GNU General Public License
16 ### along with Octave; see the file COPYING. If not, write to the Free 16 ### along with Octave; see the file COPYING. If not, write to the Free
17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA 17 ### Software Foundation, 59 Temple Place - Suite 330, Boston, MA
18 ### 02111-1307, USA. 18 ### 02111-1307, USA.
19 19
20 ## usage: lcm (a, ...)
21 ##
22 ## lcm (a) returns the least common multiple of the entries of the
23 ## integer vector a.
24 ## lcm (a1, ..., ak) is the same as lcm([a1, ..., ak]).
25
20 function l = lcm (a, ...) 26 function l = lcm (a, ...)
21 27
22 ## usage: lcm (a, ...) 28 ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 16, 1994.
23 ##
24 ## lcm (a) returns the least common multiple of the entries of the
25 ## integer vector a.
26 ## lcm (a1, ..., ak) is the same as lcm([a1, ..., ak]).
27
28 ## Written by KH (Kurt.Hornik@ci.tuwien.ac.at) on Sep 16, 1994.
29 29
30 if (nargin > 1) 30 if (nargin > 1)
31 va_start; 31 va_start;
32 for k = 2:nargin; 32 for k = 2:nargin;
33 a = [a, (va_arg ())]; 33 a = [a, (va_arg ())];