Cody

Problem 520. Choose the best fitting dominoes

Created by Doug Hull in Community

You will be given a cell array of nx2 matrices. Choose one row from each matrix. These are the ordered pairs that will be placed in a line like this.

{[1 2  [4 5 [0 4
  3 5   2 4  3 2
  1 5]  5 1] 5 3]}

Choices might be: [1 2 3]

yields: [1 2][2 4][5 3]
    or: abs(2-2) + abs(4-5)
    or:        0 + 1
    or: 1

You are trying to minimize the score, the absolute difference of the sum of the difference at the intersections.

Solution Stats

41.52% Correct | 58.48% Incorrect
Last solution submitted on Feb 16, 2019

Problem Comments

Solution Comments

Recent Solvers157

Suggested Problems

More from this Author52

Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!