Cody

Problem 42617. List of built-in demo images

Solution 739632

Submitted on 20 Sep 2015 by LY Cao
• Size: 23
• This is the leading solution.
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   Pass
%% 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))

c = Columns 1 through 5 'bag.png' 'blobs.png' 'circles.png' 'circlesBrightDark…' 'coins.png' Columns 6 through 9 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' 'fabric.png' Columns 10 through 14 'gantrycrane.png' 'glass.png' 'hestain.png' 'kobi.png' 'liftingbody.png' Columns 15 through 19 'lighthouse.png' 'onion.png' 'pears.png' 'pillsetc.png' 'rice.png' Columns 20 through 24 'riceblurred.png' 'saturn.png' 'snowflakes.png' 'tape.png' 'testpat1.png' Columns 25 through 29 'text.png' 'tissue.png' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' Columns 30 through 31 'westconcordaerial…' 'westconcordorthop…'

3   Pass
%% 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))

c = Columns 1 through 5 'football.jpg' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'office_1.jpg' Columns 6 through 10 'office_2.jpg' 'office_3.jpg' 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' Column 11 'yellowlily.jpg'

4   Pass
%% 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))

c = Columns 1 through 5 'football.jpg' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'office_1.jpg' Columns 6 through 10 'office_2.jpg' 'office_3.jpg' 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' Column 11 'yellowlily.jpg'

5   Pass
%% 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))

c = Columns 1 through 4 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 5 through 8 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 9 through 13 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'autumn.tif' 'board.tif' 'cameraman.tif' Columns 14 through 19 'canoe.tif' 'cell.tif' 'circbw.tif' 'circuit.tif' 'eight.tif' 'forest.tif' Columns 20 through 25 'hotcoffee.tif' 'kids.tif' 'logo.tif' 'm83.tif' 'mandi.tif' 'moon.tif' Columns 26 through 31 'mri.tif' 'paper1.tif' 'pout.tif' 'shadow.tif' 'spine.tif' 'tire.tif' Column 32 'trees.tif'

6   Pass
%% 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)))

c = Columns 1 through 4 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 5 through 8 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 9 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 15 through 19 'cameraman.tif' 'canoe.tif' 'cell.tif' 'circbw.tif' 'circles.png' Columns 20 through 23 'circlesBrightDark…' 'circuit.tif' 'coins.png' 'coloredChips.png' Columns 24 through 28 'concordaerial.png' 'concordorthophoto…' 'eight.tif' 'fabric.png' 'forest.tif' Columns 29 through 33 'gantrycrane.png' 'glass.png' 'hestain.png' 'hotcoffee.tif' 'kids.tif' Columns 34 through 39 'kobi.png' 'liftingbody.png' 'lighthouse.png' 'logo.tif' 'm83.tif' 'mandi.tif' Columns 40 through 45 'moon.tif' 'mri.tif' 'onion.png' 'paper1.tif' 'pears.png' 'pillsetc.png' Columns 46 through 50 'pout.tif' 'rice.png' 'riceblurred.png' 'saturn.png' 'shadow.tif' Columns 51 through 56 'snowflakes.png' 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' Columns 57 through 61 'tissue.png' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'trees.tif' Columns 62 through 63 'westconcordaerial…' 'westconcordorthop…'

7   Pass
%% 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)))

c = Columns 1 through 4 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 5 through 8 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 9 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 15 through 19 'cameraman.tif' 'canoe.tif' 'cell.tif' 'circbw.tif' 'circles.png' Columns 20 through 23 'circlesBrightDark…' 'circuit.tif' 'coins.png' 'coloredChips.png' Columns 24 through 28 'concordaerial.png' 'concordorthophoto…' 'eight.tif' 'fabric.png' 'football.jpg' Columns 29 through 33 'forest.tif' 'gantrycrane.png' 'glass.png' 'greens.jpg' 'hands1.jpg' Columns 34 through 38 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' 'kids.tif' 'kobi.png' Columns 39 through 44 'liftingbody.png' 'lighthouse.png' 'logo.tif' 'm83.tif' 'mandi.tif' 'moon.tif' Columns 45 through 49 'mri.tif' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' 'office_4.jpg' Columns 50 through 54 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' 'pears.png' Columns 55 through 60 'pillsetc.png' 'pout.tif' 'rice.png' 'riceblurred.png' 'saturn.png' 'shadow.tif' Columns 61 through 66 'snowflakes.png' 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' Columns 67 through 71 'tissue.png' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'trees.tif' Columns 72 through 74 'westconcordaerial…' 'westconcordorthop…' 'yellowlily.jpg'

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

c = {}

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

c = {}

10   Pass
%% 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)))

c = Columns 1 through 4 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 5 through 8 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 9 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 15 through 19 'cameraman.tif' 'canoe.tif' 'cell.tif' 'circbw.tif' 'circles.png' Columns 20 through 23 'circlesBrightDark…' 'circuit.tif' 'coins.png' 'coloredChips.png' Columns 24 through 28 'concordaerial.png' 'concordorthophoto…' 'eight.tif' 'fabric.png' 'football.jpg' Columns 29 through 33 'forest.tif' 'gantrycrane.png' 'glass.png' 'greens.jpg' 'hands1.jpg' Columns 34 through 38 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' 'kids.tif' 'kobi.png' Columns 39 through 44 'liftingbody.png' 'lighthouse.png' 'logo.tif' 'm83.tif' 'mandi.tif' 'moon.tif' Columns 45 through 49 'mri.tif' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' 'office_4.jpg' Columns 50 through 54 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' 'pears.png' Columns 55 through 60 'pillsetc.png' 'pout.tif' 'rice.png' 'riceblurred.png' 'saturn.png' 'shadow.tif' Columns 61 through 66 'snowflakes.png' 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' Columns 67 through 71 'tissue.png' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'trees.tif' Columns 72 through 74 'westconcordaerial…' 'westconcordorthop…' 'yellowlily.jpg'