Cody

# Problem 42617. List of built-in demo images

Solution 1872917

Submitted on 13 Jul 2019
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
filetext = fileread('demoimages.m'); assert(isempty(strfind(filetext, 'cameraman.tif')))

2   Fail
c = demoimages({'.png'}); c_correct = {'bag.png','blobs.png','circles.png','circlesBrightDark.png','coins.png','coloredChips.png','concordaerial.png','concordorthophoto.png','fabric.png','gantrycrane.png','glass.png','hestain.png','kobi.png','liftingbody.png','lighthouse.png','onion.png','pears.png','pillsetc.png','rice.png','riceblurred.png','saturn.png','snowflakes.png','tape.png','testpat1.png','text.png','tissue.png','toyobjects.png','toysflash.png','toysnoflash.png','westconcordaerial.png','westconcordorthophoto.png'}; assert(isequal(c,c_correct))

Assertion failed.

3   Fail
c = demoimages({'.jpg'}); c_correct = {'football.jpg','greens.jpg','hands1.jpg','hands2.jpg','office_1.jpg','office_2.jpg','office_3.jpg','office_4.jpg','office_5.jpg','office_6.jpg','yellowlily.jpg'}; assert(isequal(c,c_correct))

Assertion failed.

4   Fail
c = demoimages({'.bmp','.jpg'}); c_correct = {'football.jpg','greens.jpg','hands1.jpg','hands2.jpg','office_1.jpg','office_2.jpg','office_3.jpg','office_4.jpg','office_5.jpg','office_6.jpg','yellowlily.jpg'}; assert(isequal(c,c_correct))

Assertion failed.

5   Fail
c = demoimages({'.tif'}); c_correct = {'AT3_1m4_01.tif','AT3_1m4_02.tif','AT3_1m4_03.tif','AT3_1m4_04.tif','AT3_1m4_05.tif','AT3_1m4_06.tif','AT3_1m4_07.tif','AT3_1m4_08.tif','AT3_1m4_09.tif','AT3_1m4_10.tif','autumn.tif','board.tif','cameraman.tif','canoe.tif','cell.tif','circbw.tif','circuit.tif','eight.tif','forest.tif','hotcoffee.tif','kids.tif','logo.tif','m83.tif','mandi.tif','moon.tif','mri.tif','paper1.tif','pout.tif','shadow.tif','spine.tif','tire.tif','trees.tif'}; assert(isequal(c,c_correct))

Assertion failed.

6   Fail
c = demoimages({'.tif','.png'}); c_correct = {'AT3_1m4_01.tif','AT3_1m4_02.tif','AT3_1m4_03.tif','AT3_1m4_04.tif','AT3_1m4_05.tif','AT3_1m4_06.tif','AT3_1m4_07.tif','AT3_1m4_08.tif','AT3_1m4_09.tif','AT3_1m4_10.tif','autumn.tif','board.tif','cameraman.tif','canoe.tif','cell.tif','circbw.tif','circuit.tif','eight.tif','forest.tif','hotcoffee.tif','kids.tif','logo.tif','m83.tif','mandi.tif','moon.tif','mri.tif','paper1.tif','pout.tif','shadow.tif','spine.tif','tire.tif','trees.tif','bag.png','blobs.png','circles.png','circlesBrightDark.png','coins.png','coloredChips.png','concordaerial.png','concordorthophoto.png','fabric.png','gantrycrane.png','glass.png','hestain.png','kobi.png','liftingbody.png','lighthouse.png','onion.png','pears.png','pillsetc.png','rice.png','riceblurred.png','saturn.png','snowflakes.png','tape.png','testpat1.png','text.png','tissue.png','toyobjects.png','toysflash.png','toysnoflash.png','westconcordaerial.png','westconcordorthophoto.png'}; assert(isequal(c,sort(c_correct)))

Assertion failed.

7   Fail
c = demoimages({'.jpg','.png','.tif'}); c_correct = {'football.jpg','greens.jpg','hands1.jpg','hands2.jpg','office_1.jpg','office_2.jpg','office_3.jpg','office_4.jpg','office_5.jpg','office_6.jpg','yellowlily.jpg','bag.png','blobs.png','circles.png','circlesBrightDark.png','coins.png','coloredChips.png','concordaerial.png','concordorthophoto.png','fabric.png','gantrycrane.png','glass.png','hestain.png','kobi.png','liftingbody.png','lighthouse.png','onion.png','pears.png','pillsetc.png','rice.png','riceblurred.png','saturn.png','snowflakes.png','tape.png','testpat1.png','text.png','tissue.png','toyobjects.png','toysflash.png','toysnoflash.png','westconcordaerial.png','westconcordorthophoto.png','AT3_1m4_01.tif','AT3_1m4_02.tif','AT3_1m4_03.tif','AT3_1m4_04.tif','AT3_1m4_05.tif','AT3_1m4_06.tif','AT3_1m4_07.tif','AT3_1m4_08.tif','AT3_1m4_09.tif','AT3_1m4_10.tif','autumn.tif','board.tif','cameraman.tif','canoe.tif','cell.tif','circbw.tif','circuit.tif','eight.tif','forest.tif','hotcoffee.tif','kids.tif','logo.tif','m83.tif','mandi.tif','moon.tif','mri.tif','paper1.tif','pout.tif','shadow.tif','spine.tif','tire.tif','trees.tif'}; assert(isequal(c,sort(c_correct)))

Assertion failed.

8   Pass
assert(isempty(demoimages({'.bmp'})))

9   Pass
assert(isempty(demoimages({'.gif'})))

10   Fail
c = demoimages({'.bmp','.gif','.tif','.png','.jpg'}); c_correct = {'AT3_1m4_01.tif','AT3_1m4_02.tif','AT3_1m4_03.tif','AT3_1m4_04.tif','AT3_1m4_05.tif','AT3_1m4_06.tif','AT3_1m4_07.tif','AT3_1m4_08.tif','AT3_1m4_09.tif','AT3_1m4_10.tif','autumn.tif','board.tif','cameraman.tif','canoe.tif','cell.tif','circbw.tif','circuit.tif','eight.tif','forest.tif','hotcoffee.tif','kids.tif','logo.tif','m83.tif','mandi.tif','moon.tif','mri.tif','paper1.tif','pout.tif','shadow.tif','spine.tif','tire.tif','trees.tif','bag.png','blobs.png','circles.png','circlesBrightDark.png','coins.png','coloredChips.png','concordaerial.png','concordorthophoto.png','fabric.png','gantrycrane.png','glass.png','hestain.png','kobi.png','liftingbody.png','lighthouse.png','onion.png','pears.png','pillsetc.png','rice.png','riceblurred.png','saturn.png','snowflakes.png','tape.png','testpat1.png','text.png','tissue.png','toyobjects.png','toysflash.png','toysnoflash.png','westconcordaerial.png','westconcordorthophoto.png','football.jpg','greens.jpg','hands1.jpg','hands2.jpg','office_1.jpg','office_2.jpg','office_3.jpg','office_4.jpg','office_5.jpg','office_6.jpg','yellowlily.jpg'}; assert(isequal(c,sort(c_correct)))

Assertion failed.