The common factor must be an integer too, or else there is no way to find it without more parameters; defining the step and search interval for instance. Currently, any multiple of 5 would produce a valid "restored vector" for the only available test. The problem also needs a better test suite. It's a good problem.
Doesn't always work, for example when x = 11*[ 5, 7, 32] .
Oops. C itself doesn't have to be an integer. Should have checked the test suite more carefully...
Distance walked 3D
Omit columns averages from a matrix
Rotate a Matrix
How many monitors are connected ?
Matrix to column conversion
Find the treasures in MATLAB Central and discover how the community can help you!
Select a Web
Choose a web site to get translated content where available and see local events and
offers. Based on
your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country
sites are not optimized for visits from your location.
Contact your local office