MATLAB: Help with Barcode reading!

.mbarcodeshomeworkMATLAB

So there is this barcodes matrix
barcodes = {':…:::.:…..::::….:..::.:..:.:..:.:..:..:.::…';
':.:.:…::.:…:::….::..:.:….::…:.:…::.:..:'};
I'm trying to associate specific dots and colons to a specific numeric value to be able to read the barcode.
Given:
1 = …::
2 = ..:.:
3 = ..::.
4 = .:..:
5 = .:.:.
6 = .::..
7 = :…:
8 = :..:.
9 = :.:..
0 = ::…
How can I write a for loop function that coverts barcodes matrix into numbers?

Best Answer

I just answered this yesterday: http://www.mathworks.com/matlabcentral/answers/108076#answer_116773 with the very same codes. Perhaps megan is your classmates. So it looks like it must be homework, which, to be honest, means you should have tagged your post with a "homework" tag.