Cody

# Problem 42617. List of built-in demo images

Solution 738922

Submitted on 18 Sep 2015 by Peng Liu
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')))

filetext = function y = demoimages(FilterSpec) struct2cell(dir(fullfile(matlabroot, 'toolbox/images/imdata'))); ans(1,:) id = 0; for y = FilterSpec id = id | cellfun(@(x) any(strfind(x,y{:})), ans); end y = ans(id); %This code written by profile_id 2951682

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' 'yellowlily.jpg'

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' '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))

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' '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))

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' 'yellowlily.jpg'

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' 'yellowlily.jpg'

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' 'yellowlily.jpg'

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' 'yellowlily.jpg'

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyobjects.png' 'toysflash.png' 'toysnoflash.png' 'traffic.avi' Columns 102 through 106 'traffic.mj2' 'trees.mat' 'trees.tif' 'westconcordaerial…' 'westconcordorthop…' Columns 107 through 108 'westconcordpoints…' 'yellowlily.jpg'

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

ans = Columns 1 through 6 '.' '..' 'AT3_1m4_01.tif' 'AT3_1m4_02.tif' 'AT3_1m4_03.tif' 'AT3_1m4_04.tif' Columns 7 through 10 'AT3_1m4_05.tif' 'AT3_1m4_06.tif' 'AT3_1m4_07.tif' 'AT3_1m4_08.tif' Columns 11 through 14 'AT3_1m4_09.tif' 'AT3_1m4_10.tif' 'CT-MONO2-16-ankle…' 'Contents.m' Columns 15 through 19 'US-PAL-8-10x-echo…' 'autumn.tif' 'bag.png' 'blobs.png' 'board.tif' Columns 20 through 24 'brainMRI.hdr' 'brainMRI.img' 'cameraman.tif' 'canoe.tif' 'cell.tif' Columns 25 through 29 'cellsequence.mat' 'circbw.tif' 'circles.png' 'circlesBrightDark…' 'circuit.tif' Columns 30 through 33 'coins.png' 'coloredChips.png' 'concordaerial.png' 'concordorthophoto…' Columns 34 through 38 'eight.tif' 'fabric.png' 'football.jpg' 'forest.tif' 'gantrycrane.png' Columns 39 through 44 'glass.png' 'greens.jpg' 'hands1.jpg' 'hands2.jpg' 'hestain.png' 'hotcoffee.tif' Columns 45 through 50 'imdemos.mat' 'kids.tif' 'knee1.dcm' 'knee2.dcm' 'kobi.png' 'lab8.icm' Columns 51 through 55 'liftingbody.png' 'lighthouse.png' 'littlecoriver.lan' 'logo.tif' 'm83.tif' Columns 56 through 61 'mandi.tif' 'mississippi.lan' 'monitor.icm' 'montana.lan' 'moon.tif' 'mri.tif' Columns 62 through 66 'mristack.mat' 'office.hdr' 'office_1.jpg' 'office_2.jpg' 'office_3.jpg' Columns 67 through 71 'office_4.jpg' 'office_5.jpg' 'office_6.jpg' 'onion.png' 'paper1.tif' Columns 72 through 77 'paris.lan' 'pears.png' 'pendulum.mat' 'peppers.dpx' 'pillsetc.png' 'pout.tif' Columns 78 through 82 'regioncoordinates…' 'rhinos.avi' 'rice.png' 'riceblurred.png' 'rio.lan' Columns 83 through 85 'rirePatient007CT.…' 'rirePatient007CT.…' 'rirePatient007MRT…' Columns 86 through 90 'rirePatient007MRT…' 'saturn.png' 'shadow.tif' 'snowflakes.png' 'solarspectra.fts' Columns 91 through 96 'spine.tif' 'tape.png' 'testpat1.png' 'text.png' 'tire.tif' 'tissue.png' Columns 97 through 101 'tokyo.lan' 'toyo