function test_name2display(name) fprintf([... '######################################################\n'... ' Test for Name2Display \n'... '######################################################\n'... ]); if exist('name','var') filename_list={name}; else filename_list={... 'Image1a.png'... 'toto'... 'B001_1.png'...% does not work for Joel function ! 'B001.png'... 'B008a.png'... 'B002B.png'... 'B_001.png'... 'B_001AB.png'... 'aa45_2.png'... 'B005.png'... 'Image_3.jpg'... 'Image_3-4.jpg'... 'Image_3-4_2.jpg'... 'Image_5_3-4.jpg'... 'Image_3-4_5-6.jpg'... 'Image_003-004_5-6.jpg'... 'Image_3-4_005-006.jpg'... 'Image_3-004_5-06.jpg'... }; end for filename=filename_list [RootPath,RootFile,i1,i2,str_a,str_b,ext,NomType,SubDir]=name2display(filename{1}); [RootPath_bis,RootFile_bis,i1_bis,i2_bis,j1_bis,j2_bis,ext_bis,NomType_bis,SubDir_bis]=... name2display2(filename{1}); fprintf([... 'File name : ' filename{1} '\n'... ' NomType : ' NomType ' // ' NomType_bis '\n'... ' RootFile : ' RootFile ' // ' RootFile_bis '\n'... ' i1 : ' i1 ' // ' num2str(i1_bis) '\n'... ' i2 : ' i2 ' // ' num2str(i2_bis) '\n'... ' str_a/j1 : ' str_a ' // ' num2str(j1_bis) '\n'... ' str_b/j2 : ' str_b ' // ' num2str(j2_bis) '\n'... ]); end