Cody

# Problem 781. Access a web hosted copy of the Tiles Contest MAT file

Solution 194821

Submitted on 21 Jan 2013 by Alfonso Nieto-Castanon
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
%% % Cody External accessibility y=clock; rand('state',floor(10000*y(6))) brd=randi(100,1) fn='http://www.toobigforemail.com/cryptkeeper.toobig?nppmkc2=xyeffg&6cq_kc2=yae1d8&6cq_konmpb=y88ayxyx8xxy1xdyx'; fn='http://tinyurl.com/matlab-tiles-mat'; testSuiteFile = 'raz_tiles.mat'; urlwrite(fn,testSuiteFile); tests = load(testSuiteFile,'testsuite'); tiles = tests.testsuite(brd).tiles; rows = tests.testsuite(brd).r; cols = tests.testsuite(brd).c; expected=[size(tiles,1) rows cols] out=access_url_mat(fn,brd) assert(isequal(out,expected))

``` brd = 31 expected = 13 12 21 out = 13 12 21 ```

2   Pass
%% brd=randi(100,1) fn='http://www.toobigforemail.com/cryptkeeper.toobig?nppmkc2=xyeffg&6cq_kc2=yae1d8&6cq_konmpb=y88ayxyx8xxy1xdyx'; fn='http://tinyurl.com/matlab-tiles-mat'; testSuiteFile = 'raz_tiles.mat'; urlwrite(fn,testSuiteFile); tests = load(testSuiteFile,'testsuite'); tiles = tests.testsuite(brd).tiles; rows = tests.testsuite(brd).r; cols = tests.testsuite(brd).c; expected=[size(tiles,1) rows cols] out=access_url_mat(fn,brd) assert(isequal(out,expected))

``` brd = 58 expected = 81 9 9 out = 81 9 9 ```