Cody

Problem 136. Read a Soroban Abacus

Description

The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found here.

The soroban essentially consists of 7xN slots that 5xN beads may occupy. The input to the function will be a graphical representation of the soroban where true signifies a slot filled with a bead whereas false signifies a vacant slot. You can assume that all inputs will be valid soroban configurations.

Example

   input = [ 1 1 0 0 0
             0 0 1 1 1
             1 0 0 1 1
             0 1 1 1 0
             1 1 1 1 1
             1 1 1 0 1
             1 1 1 1 1 ];
   output = 10586

Solution Stats

54.85% Correct | 45.15% Incorrect
Last solution submitted on Nov 29, 2016

Problem Comments

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!

Join the 15-year community celebration.

Play games and win prizes!

Learn more