May be I am wrong. But, are test 7 and 8 correct?
Looks like 7 and 8 should use fit(x), not fit(x,y).
Sorry for that. Fixed now.
Every test is correct. The problem with the circle packing algorithm is precision. Set the precision wrongly and we will miss a lot of circles (It was fun to revisit this kind of problem). And btw, the upper bound for circle packing in the plane is pi/sqrt(12) of the total area. Ignore the spheres in the question, it's a circle packing problem ("easy" version, since we already have the radii).
Inner product of two vectors
Getting logical indexes
Possible Outcomes of American Roulette
Wheat on a chessboard pt 1
Matrix multiplication across rows
Pernicious Anniversary Problem
Polite numbers. N-th polite number.
Arithmetic/geometric sequence, 50/50
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