annotate toolboxes/MIRtoolbox1.3.2/somtoolbox/som_use_vs2.m @ 0:cc4b1211e677 tip

initial commit to HG from Changeset: 646 (e263d8a21543) added further path and more save "camirversion.m"
author Daniel Wolff
date Fri, 19 Aug 2016 13:07:06 +0200
parents
children
rev   line source
Daniel@0 1 function som_use_vs2()
Daniel@0 2
Daniel@0 3 % SOM_USE_VS2 Use SOM Toolbox version 2.
Daniel@0 4 %
Daniel@0 5 % Removes SOM Toolbox version 1 from the path and adds version 2
Daniel@0 6 % there instead. You can use function SOM_VS1TO2 to convert
Daniel@0 7 % any version 1 structs to the corresponding version 2 structs.
Daniel@0 8 %
Daniel@0 9 % See also SOM_USE_VS1, SOM_VS1TO2, SOM_VS2TO1, PATHTOOL.
Daniel@0 10
Daniel@0 11 s=path; p=findstr(s,'somtoolbox');
Daniel@0 12 while any(p),
Daniel@0 13 p=p(1);
Daniel@0 14 i=p; while i<length(s) & ~strcmp(s(i),':'), i=i+1; end
Daniel@0 15 if strcmp(s(i),':'), i=i-1; end
Daniel@0 16 j=p; while j>1 & ~strcmp(s(j),':'), j=j-1; end
Daniel@0 17 if strcmp(s(j),':'), j=j+1; end
Daniel@0 18 r=s(j:i);
Daniel@0 19 rmpath(r);
Daniel@0 20 s=path; p=findstr(s,'somtoolbox');
Daniel@0 21 end
Daniel@0 22
Daniel@0 23 addpath /share/somtoolbox/www/package/codes2
Daniel@0 24
Daniel@0 25 fprintf(1,'Version 2 of SOM Toolbox now in use.\n');
Daniel@0 26 fprintf(1,'Latest changes to SOM Toolbox: August 22nd 2000\n');
Daniel@0 27 fprintf(1,' see /share/somtoolbox/vs2/changelog.txt\n');
Daniel@0 28 fprintf(1,'Use som_vs1to2 function to convert any vs1 structs to vs2.\n')
Daniel@0 29