function m = mylcm(varargin)

nums = [varargin{:}];
if ~isnumeric(nums) | any(nums ~= round(real(nums))) | any(nums <= 0)
	error('Arguments must be positive integers.')
end

for k = 2:length(nums);
	nums(k) = lcm(nums(k), nums(k-1));
end
m = nums(end);
