MATLAB: How to do that.the product of four consecutive even integers is 13440. Using Matlab

interpolationpolynomial

the product of four consecutive even integers is 13440. Using Matlab's build-in function for operations with polynomials, determine the four integers.
I don't know how to do that
answer is 8 10 12 14
help me please

Best Answer

One approach is to use brute force:
N = 13440 ;
for k = 2:N
v = k + [0:2:6] ;
p = prod(v) ;
if prod(v)==N,
disp('N is the product of :') ;
disp (v)
break
elseif prod(v) > N
disp('There is no solution')
break
end
end
There are many optimalisations that can be made ...