Changeset 94


Ignore:
Timestamp:
May 28, 2010, 10:06:47 AM (11 years ago)
Author:
sommeria
Message:

civ.m corrected to work for windows system

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r91 r94  
    113113    sparam=convert(t);
    114114    catch
    115          errormsg={[' Unable to read the file PARAM.xml defining the civx binaries:']; lasterr};   
     115         errormsg={' Unable to read the file PARAM.xml defining the civx binaries:'; lasterr};   
    116116    end
    117117else
     
    131131    set(handles.BATCH,'BackgroundColor',[0.831 0.816 0.784])% put the BATCH button in grey (unactivated)
    132132end
     133if isfield(sparam.RunParam,'CivBin')
     134    if ~exist(sparam.RunParam.CivBin,'file')
     135         sparam.RunParam.CivBin=fullfile(path_UVMAT,sparam.RunParam.CivBin);
     136    end
     137end
     138patch_newBin=exist(sparam.RunParam.CivBin,'file');
    133139set(handles.subdir_civ1,'String',subdir)%default subdir on which uvmat was working
    134140set(handles.subdir_civ2,'String',subdir)%default subdir on which uvmat was working
     
    304310    browse=get(handles.browse_root,'UserData');
    305311end
    306 if length(ext)>1 && (~isempty(imformats(ext([2:end])))||...
     312if length(ext)>1 && (~isempty(imformats(ext(2:end)))||...
    307313                       isequal(ext,'.avi')||isequal(ext,'.AVI'));%if an image file has been opened by uvmat
    308314    set(handles.ImaExt,'String',ext)
     
    551557    if isfield(XmlData,'GeometryCalib')
    552558        tsai=XmlData.GeometryCalib;
    553         if isfield(tsai,'f') & isfield(tsai,'Tz') & isfield(tsai,'dpx') & isfield(tsai,'dpy')& isfield(tsai,'R')
    554              rot2D=tsai.R([1:2],[1,2]);
     559        if isfield(tsai,'f') && isfield(tsai,'Tz') && isfield(tsai,'dpx') && isfield(tsai,'dpy')&& isfield(tsai,'R')
     560             rot2D=tsai.R(1:2,[1,2]);
    555561             pxcmx_search=tsai.f * sqrt(det(rot2D))/(tsai.Tz*tsai.dpx);
    556562             pxcmy_search=tsai.f * sqrt(det(rot2D))/(tsai.Tz*tsai.dpy);           
     
    587593            nbfield=info.NumFrames;%number of frames
    588594        end
    589         time=(dt*[0:nbfield-1])';%list of image times   
     595        time=(dt*(0:nbfield-1))';%list of image times   
    590596        %set(handles.dt,'String',num2str(dt*1000));%store the time interval between successive images
    591597end
     
    665671    %determine the set of times and possible intervals for CIV
    666672 %   dt=(1/1000)*str2num(get(handles.dt,'String'));
    667     time=[0:nb_field-1]';% time=file index -1  by default
     673    time=(0:nb_field-1)';% time=file index -1  by default
    668674    if strcmp(nom_type_ima,'_i_j')
    669675       % time=[0:nb_field-1]'*ones(1,nb_field_j);% time=file index -1  by default
     
    11571163    nom_type_nc=browse.nom_type_nc;
    11581164end
    1159 if isequal(nom_type_ima,'png_old') | isequal(nom_type_ima,'netc_old')| isequal(nom_type_ima,'raw_SMD')| isequal(nom_type_nc,'netc_old')
     1165if isequal(nom_type_ima,'png_old') || isequal(nom_type_ima,'netc_old')|| isequal(nom_type_ima,'raw_SMD')|| isequal(nom_type_nc,'netc_old')
    11601166    nom_type_nc='netc_old';%nom_type for the netcdf files
    1161 elseif isequal(nom_type_ima,'none')|isequal(nom_type_nc,'none')
     1167elseif isequal(nom_type_ima,'none')||isequal(nom_type_nc,'none')
    11621168    nom_type_nc='none';
    1163 elseif isequal(nom_type_ima,'avi')|isequal(nom_type_ima,'_i')|isequal(nom_type_ima,'ima_num')|isequal(nom_type_nc,'_i1-i2')
     1169elseif isequal(nom_type_ima,'avi')||isequal(nom_type_ima,'_i')||isequal(nom_type_ima,'ima_num')||isequal(nom_type_nc,'_i1-i2')
    11641170     nom_type_nc='_i1-i2';
    11651171else
     
    20302036function launch_jobs(hObject, eventdata, handles, batch)
    20312037%-----------------------------------------------------------------------
    2032 % global civ2Bin patchBin patch_newBin fixBin CivBin % probabely to remove
    2033 
    20342038compare=get(handles.compare,'Value');%test for usual PIV (compare=1) or displacement (=2) or stereo PIV (=3)
    20352039
     
    21172121end
    21182122if isfield(sparam,'CivBin')
    2119     CivBin=sparam.CivBin;
     2123    if ~exist(sparam.CivBin,'file')
     2124         sparam.CivBin=fullfile(path_UVMAT,sparam.CivBin);
     2125    end
    21202126end
    21212127if isfield(sparam,'Civ1Bin')
    2122     civ1Bin=sparam.Civ1Bin;
     2128    if ~exist(sparam.Civ1Bin,'file')
     2129         sparam.Civ1Bin=fullfile(path_UVMAT,sparam.Civ1Bin);
     2130    end
    21232131end
    21242132if isfield(sparam,'Civ2Bin')
    2125     civ2Bin=sparam.Civ2Bin;
     2133    if ~exist(sparam.Civ2Bin,'file')
     2134         sparam.Civ2Bin=fullfile(path_UVMAT,sparam.Civ2Bin);
     2135    end
    21262136end
    21272137test_interp=get(handles.test_interp,'Value');
    21282138if ~test_interp && isfield(sparam,'PatchBin')
    2129     PatchBin=sparam.PatchBin;
     2139    if ~exist(sparam.PatchBin,'file')
     2140         sparam.PatchBin=fullfile(path_UVMAT,sparam.PatchBin);
     2141    end
    21302142end
    21312143if test_interp && isfield(sparam,'PatchNewBin')
    2132     PatchBin=sparam.PatchNewBin;
     2144    if ~exist(sparam.PatchNewBin,'file')
     2145         sparam.PatchNewBin=fullfile(path_UVMAT,sparam.PatchNewBin);
     2146    end
    21332147end
    21342148if isfield(sparam,'FixBin')
    2135     fixBin=sparam.FixBin;
     2149%     fixBin=sparam.FixBin;
     2150    if ~exist(sparam.FixBin,'file')
     2151         sparam.FixBin=fullfile(path_UVMAT,sparam.FixBin);
     2152    end
    21362153end
    21372154if batch
     
    23992416            i_cmd=i_cmd+1;
    24002417            if isequal(civAll,0)
    2401                 cmd=[cmd BATCH_CIV1(filename_cmx(1:end-4),namelog,par_civ1,handles,sparam) '\n'];
     2418                cmd=[cmd CIV1_CMD(filename_cmx(1:end-4),namelog,par_civ1,handles,sparam) '\n'];
    24022419            else
    24032420                 civAllCmd=[civAllCmd ' civ1 '];
    2404                  str=BATCH_CIV1_Unified(filename_cmx([1:end-4]),namelog,par_civ1);
     2421                 str=CIV1_CMD_Unified(filename_cmx([1:end-4]),namelog,par_civ1);
    24052422                 fieldnames=fields(str);
    24062423                [civAllxml,uid_civ1]=add(civAllxml,1,'element','civ1');
     
    24282445           end
    24292446           if isequal(civAll,0)
    2430            cmd_FIX=[fixBin ' -f ' filecell.nc.civ1{ifile,j} ' -fi1 ' num2str(flagindex1(1)) ...
     2447                cmd_FIX=[sparam.FixBin ' -f ' filecell.nc.civ1{ifile,j} ' -fi1 ' num2str(flagindex1(1)) ...
    24312448                   ' -fi2 ' num2str(flagindex1(2)) ' -fi3 ' num2str(flagindex1(3)) ...
    24322449                   ' -threshC ' num2str(thresh_vecC1) ' -threshV ' num2str(thresh_vel1) ' -maskName ' maskname];
    2433            cmd=[cmd cmd_FIX '\n'];
     2450                cmd_FIX=regexprep(cmd_FIX,'\\','\\\\');
     2451                cmd=[cmd cmd_FIX '\n'];
    24342452           else
    24352453                fix1.inputFileName=filecell.nc.civ1{ifile,j} ;
     
    24552473    if box_test(3)==1
    24562474        if isequal(civAll,0)
    2457             cmd_PATCH=RUN_PATCH(filecell.nc.civ1{ifile,j},nx_patch1,ny_patch1,rho_patch1,subdomain_patch1,thresh_patch1,test_interp,PatchBin);
     2475            cmd_PATCH=PATCH_CMD(filecell.nc.civ1{ifile,j},nx_patch1,ny_patch1,rho_patch1,subdomain_patch1,thresh_patch1,test_interp,sparam.PatchBin);
     2476            cmd_PATCH=regexprep(cmd_PATCH,'\\','\\\\');
    24582477            cmd=[cmd cmd_PATCH '\n'];
    24592478        else
     
    25652584            %endTESTgrid
    25662585            i_cmd=i_cmd+1;
    2567             cmd_CIV2=BATCH_CIV2(filename_cmx,namelog,par_civ2,sparam);
     2586            cmd_CIV2=CIV2_CMD(filename_cmx,namelog,par_civ2,sparam);
    25682587            if isequal(civAll,0)
    25692588                if(isunix)
    25702589                    cmd=[cmd 'cp -f ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2 '\n'];
    25712590                else
     2591                    filename_cmx=regexprep(filename_cmx,'\\','\\\\');
    25722592                    cmd=[cmd 'copy /Y ' filename_cmx '2 ' filename_cmx '\n' cmd_CIV2 '\n'];
    25732593                end
    25742594            else
    25752595                 civAllCmd=[civAllCmd ' civ2 '];
    2576                  str=BATCH_CIV2_Unified(filename_cmx([1:end-4]),namelog,par_civ2);
     2596                 str=CIV2_CMD_Unified(filename_cmx([1:end-4]),namelog,par_civ2);
    25772597                 fieldnames=fields(str);
    25782598                [civAllxml,uid_civ2]=add(civAllxml,1,'element','civ2');
     
    26002620            end                 
    26012621           if isequal(civAll,0)
    2602                 cmd_FIX=[fixBin ' -f ' filecell.nc.civ2{ifile,j} ' -fi1 ' num2str(flagindex2(1)) ...
     2622                cmd_FIX=[sparam.FixBin ' -f ' filecell.nc.civ2{ifile,j} ' -fi1 ' num2str(flagindex2(1)) ...
    26032623                   ' -fi2 ' num2str(flagindex2(2)) ' -fi3 ' num2str(flagindex2(3)) ...
    26042624                   ' -threshC ' num2str(thresh_vec2C) ' -threshV ' num2str(thresh_vel2) ' -maskName ' maskname];
    2605                 cmd=[cmd cmd_FIX '\n'];
     2625               cmd_FIX=regexprep(cmd_FIX,'\\','\\\\');
     2626               cmd=[cmd cmd_FIX '\n'];
    26062627           else                     
    26072628                fix2.inputFileName=filecell.nc.civ2{ifile,j} ;
     
    26272648       if box_test(6)==1
    26282649            if isequal(civAll,0)
    2629                 cmd_PATCH=RUN_PATCH(filecell.nc.civ2{ifile,j},nx_patch2,ny_patch2,rho_patch2,subdomain_patch2,thresh_patch2,test_interp,PatchBin);
     2650                cmd_PATCH=PATCH_CMD(filecell.nc.civ2{ifile,j},nx_patch2,ny_patch2,rho_patch2,subdomain_patch2,thresh_patch2,test_interp,sparam.PatchBin);
     2651                cmd_PATCH=regexprep(cmd_PATCH,'\\','\\\\');
    26302652                cmd=[cmd cmd_PATCH '\n'];
    26312653            else
     
    37693791%------------------------------------------------------------------------
    37703792% --- PATCH
    3771 function cmd_PATCH=RUN_PATCH(filename_nc,nx_patch,ny_patch,rho_patch,subdomain_patch,thresh_value,test_interp,PatchBin)
    3772 %------------------------------------------------------------------------
    3773 %global patchBin patch_newBin
    3774 
    3775 
     3793function cmd_PATCH=PATCH_CMD(filename_nc,nx_patch,ny_patch,rho_patch,subdomain_patch,thresh_value,test_interp,PatchBin)
     3794%------------------------------------------------------------------------
    37763795        namelog=[filename_nc([1:end-3]) '_patch.log'];
    37773796        if test_interp==0
     
    44824501set(handles.nx_patch1_title,'Visible','on')
    44834502set(handles.ny_patch1_title,'Visible','on')
    4484 if (~isequal(patch_newBin,[]) & ~isequal(patch_newBin,[]))
     4503if ~isempty(patch_newBin)
    44854504    set(handles.test_interp,'Visible','on');
    44864505end
     
    47844803%------------------------------------------------------------------------
    47854804% --- CIV1  CIV1  CIV1 CIV1
    4786 function cmd_CIV1=BATCH_CIV1(filename,namelog,par,handles,sparam)
     4805function cmd_CIV1=CIV1_CMD(filename,namelog,par,handles,sparam)
    47874806%------------------------------------------------------------------------
    47884807%pixels per cm and matrix of the image times, read from the .civ file by uvmat
     
    48274846%             textout=char(textcmx);
    48284847par.filename_ima_a=regexprep(par.filename_ima_a,'.png','');
    4829 par.filename_ima_b=regexprep(par.filename_ima_b,'.png','');% bug : .png appears two times ?
    4830    fid=fopen([filename '.cmx'],'w');
     4848par.filename_ima_b=regexprep(par.filename_ima_b,'.png','');
     4849fid=fopen([filename '.cmx'],'w');
    48314850fprintf(fid,['##############   CMX file' '\n' ]);
    48324851 fprintf(fid,   ['FirstImage ' regexprep(par.filename_ima_a,'\\','\\\\') '\n' ]);% for windows compatibility
     
    48344853  fprintf(fid,  ['XX' '\n' ]);
    48354854  fprintf(fid,  ['Mask ' par.maskflag '\n' ]);
    4836   fprintf(fid,  ['MaskName ' par.maskname '\n' ]);
     4855  fprintf(fid,  ['MaskName ' regexprep(par.maskname,'\\','\\\\') '\n' ]);
    48374856 fprintf(fid,   ['ImageSize ' par.npx ' ' par.npy '\n' ]);   %VERIFIER CAS GENERAL ?
    48384857 fprintf(fid,   ['CorrelationBoxesSize ' par.ibx ' ' par.iby '\n' ]);
     
    48464865 fprintf(fid,   ['ShiftXY ' par.shiftx ' '  par.shifty '\n' ]);
    48474866  fprintf(fid,  ['Grid ' par.gridflag '\n' ]);
    4848  fprintf(fid,   ['GridName ' par.gridname '\n' ]);
     4867 fprintf(fid,   ['GridName ' regexprep(par.gridname,'\\','\\\\') '\n' ]);
    48494868 fprintf(fid,   ['XX 85' '\n' ]);
    48504869 fprintf(fid,   ['XX 1.0' '\n' ]);
     
    48754894%------------------------------------------------------------------------
    48764895% --- CIV1  Unified
    4877 function xml_civ1_parameters=BATCH_CIV1_Unified(filename,namelog,par)
     4896function xml_civ1_parameters=CIV1_CMD_Unified(filename,namelog,par)
    48784897%------------------------------------------------------------------------
    48794898%pixels per cm and matrix of the image times, read from the .civ file by uvmat
     
    49144933%------------------------------------------------------------------------
    49154934% --- CIV2  Unified
    4916 function civ2=BATCH_CIV2_Unified(filename,namelog,par)
     4935function civ2=CIV2_CMD_Unified(filename,namelog,par)
    49174936%------------------------------------------------------------------------
    49184937%pixels per cm and matrix of the image times, read from the .civ file by uvmat
     
    49664985%------------------------------------------------------------------------
    49674986% --- CIV2  CIV2  CIV2 CIV2
    4968 function cmd_CIV2=BATCH_CIV2(filename_cmx,namelog,par,sparam)
     4987function cmd_CIV2=CIV2_CMD(filename_cmx,namelog,par,sparam)
    49694988%------------------------------------------------------------------------
    49704989%pixels per cm and matrix of the image times, read from the .civ file by uvmat
     
    49734992                par.Dt='1' ;%case of 'displacement' mode
    49744993  end
    4975 textcmx=['##############   CMX file'  '\n'...
    4976 ['FirstImage ' par.filename_ima_a]  '\n'...
    4977 ['LastImage  ' par.filename_ima_b]  '\n'...
    4978 'XX'   '\n'...
    4979 ['Mask ' par.maskflag]  '\n'...
    4980 ['MaskName ' par.maskname]  '\n'...
    4981 ['ImageSize ' par.npx ' ' par.npy]  '\n'...   
    4982 ['CorrelationBoxesSize ' par.ibx ' ' par.iby]  '\n'...
    4983 ['SearchBoxeSize ' par.ibx ' ' par.iby]  '\n'...
    4984 ['RO ' par.rho]  '\n'...
    4985 ['GridSpacing ' par.dx ' ' par.dy]  '\n'...
    4986 'XX 1.0'  '\n'...
    4987 ['Dt_TO ' par.Dt ' ' par.T0]  '\n'...
    4988 ['PixCmXY ' par.pxcmx ' ' par.pxcmy]  '\n'...
    4989 'XX 1'  '\n'...
    4990 ['ShiftXY 0 0']  '\n'...
    4991 ['Grid ' par.gridflag]  '\n'...
    4992 ['GridName ' par.gridname]  '\n'...
    4993 'XX 85'  '\n'...
    4994 'XX 1.0'  '\n'...
    4995 'XX 1.0'  '\n'...
    4996 'Hart 1'  '\n'...
    4997 ['DecimalShift ' par.decimal]  '\n'...
    4998 ['Deformation ' par.deformation]  '\n'...
    4999 'CorrelationMin 0'  '\n'...
    5000 'IntensityMin 0'  '\n'...
    5001 'SeuilImage n'  '\n'...
    5002 'SeuilImageValues 0 4096'  '\n'...
    5003 ['ImageToUse ' par.term_a ' ' par.term_b]  '\n'... % VERIFIER ?
    5004 ['ImageUsedBefore ' par.filename_nc1]];
    5005 textout=char(textcmx);
    5006 fid=fopen([filename_cmx '2'],'w');
    5007 fprintf(fid,textout);
    5008 fclose(fid)
    5009 % if sge
    5010     cmd_CIV2=[sparam.Civ2Bin ' -f ' filename_cmx ]; % redirect standard output to the log file
    5011 % else
    5012 %     cmd_CIV2=[civ2Bin ' -f ' filename_cmx ' > ' namelog ' 2>&1']; % redirect standard output to the log file
    5013 % end
     4994% textcmx=['##############   CMX file'  '\n'...
     4995% ['FirstImage ' par.filename_ima_a]  '\n'...
     4996% ['LastImage  ' par.filename_ima_b]  '\n'...
     4997% 'XX'   '\n'...
     4998% ['Mask ' par.maskflag]  '\n'...
     4999% ['MaskName ' par.maskname]  '\n'...
     5000% ['ImageSize ' par.npx ' ' par.npy]  '\n'...   
     5001% ['CorrelationBoxesSize ' par.ibx ' ' par.iby]  '\n'...
     5002% ['SearchBoxeSize ' par.ibx ' ' par.iby]  '\n'...
     5003% ['RO ' par.rho]  '\n'...
     5004% ['GridSpacing ' par.dx ' ' par.dy]  '\n'...
     5005% 'XX 1.0'  '\n'...
     5006% ['Dt_TO ' par.Dt ' ' par.T0]  '\n'...
     5007% ['PixCmXY ' par.pxcmx ' ' par.pxcmy]  '\n'...
     5008% 'XX 1'  '\n'...
     5009% ['ShiftXY 0 0']  '\n'...
     5010% ['Grid ' par.gridflag]  '\n'...
     5011% ['GridName ' par.gridname]  '\n'...
     5012% 'XX 85'  '\n'...
     5013% 'XX 1.0'  '\n'...
     5014% 'XX 1.0'  '\n'...
     5015% 'Hart 1'  '\n'...
     5016% ['DecimalShift ' par.decimal]  '\n'...
     5017% ['Deformation ' par.deformation]  '\n'...
     5018% 'CorrelationMin 0'  '\n'...
     5019% 'IntensityMin 0'  '\n'...
     5020% 'SeuilImage n'  '\n'...
     5021% 'SeuilImageValues 0 4096'  '\n'...
     5022% ['ImageToUse ' par.term_a ' ' par.term_b]  '\n'... % VERIFIER ?
     5023% ['ImageUsedBefore ' par.filename_nc1]];
     5024% textout=char(textcmx);
     5025% fid=fopen([filename_cmx '2'],'w');
     5026% fprintf(fid,textout);
     5027% fclose(fid)
     5028
     5029par.filename_ima_a=regexprep(par.filename_ima_a,'.png','');
     5030par.filename_ima_b=regexprep(par.filename_ima_b,'.png','');% bug : .png appears two times ?
     5031fid=fopen([filename_cmx '2'],'w');
     5032fprintf(fid,['##############   CMX file' '\n' ]);
     5033fprintf(fid,   ['FirstImage ' regexprep(par.filename_ima_a,'\\','\\\\') '\n' ]);% for windows compatibility
     5034fprintf(fid,   ['LastImage  ' regexprep(par.filename_ima_b,'\\','\\\\') '\n' ]);% for windows compatibility
     5035fprintf(fid,  ['XX' '\n' ]);
     5036fprintf(fid, ['Mask ' par.maskflag '\n' ]);
     5037fprintf(fid, ['MaskName ' regexprep(par.maskname,'\\','\\\\') '\n' ]);% for windows compatibility
     5038fprintf(fid, ['ImageSize ' par.npx ' ' par.npy '\n' ]);   %VERIFIER CAS GENERAL ?
     5039fprintf(fid, ['CorrelationBoxesSize ' par.ibx ' ' par.iby '\n' ]);
     5040fprintf(fid, ['SearchBoxeSize ' par.ibx ' ' par.iby '\n']);
     5041fprintf(fid, ['RO ' par.rho '\n']);
     5042fprintf(fid, ['GridSpacing ' par.dx ' ' par.dy '\n']);
     5043fprintf(fid, ['XX 1.0' '\n' ]);
     5044fprintf(fid, ['Dt_TO ' par.Dt ' ' par.T0 '\n' ]);
     5045fprintf(fid, ['PixCmXY ' par.pxcmx ' ' par.pxcmy '\n' ]);
     5046fprintf(fid, ['XX 1' '\n' ]);
     5047fprintf(fid, ['ShiftXY 0 0\n']);
     5048fprintf(fid, ['Grid ' par.gridflag '\n' ]);
     5049fprintf(fid, ['GridName ' regexprep(par.gridname,'\\','\\\\') '\n']);
     5050fprintf(fid, ['XX 85' '\n' ]);
     5051fprintf(fid, ['XX 1.0' '\n' ]);
     5052fprintf(fid, ['XX 1.0' '\n' ]);
     5053fprintf(fid, ['Hart 1' '\n' ]);
     5054fprintf(fid, ['DecimalShift ' par.decimal '\n']);
     5055fprintf(fid, ['Deformation ' par.deformation '\n']);
     5056fprintf(fid,  ['CorrelationMin 0' '\n' ]);
     5057fprintf(fid,   ['IntensityMin 0' '\n' ]);
     5058fprintf(fid,  ['SeuilImage n' '\n' ]);
     5059fprintf(fid,   ['SeuilImageValues 0 4096' '\n' ]);
     5060fprintf(fid,   ['ImageToUse ' par.term_a ' ' par.term_b '\n' ]); % VERIFIER ?
     5061fprintf(fid, ['ImageUsedBefore ' regexprep(par.filename_nc1,'\\','\\\\') '\n']);
     5062fclose(fid);
     5063
     5064cmd_CIV2=[sparam.Civ2Bin ' -f ' filename_cmx ]; % redirect standard output to the log file
     5065cmd_CIV2=regexprep(cmd_CIV2,'\\','\\\\');
    50145066
    50155067%------------------------------------------------------------------------
  • trunk/src/plot_field.m

    r93 r94  
    172172% check the cells of fields :
    173173% testnbdim=1;
    174 [CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Data)
     174[CellVarIndex,NbDim,VarType,errormsg]=find_field_indices(Data);
    175175
    176176if ~isempty(errormsg)
Note: See TracChangeset for help on using the changeset viewer.