Changeset 33
- Timestamp:
- 04/24/09 10:46:15 (16 years ago)
- Location:
- issm/trunk/src/m/utils
- Files:
-
- 20 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Exp/expmaster.m
r1 r33 33 33 numpoints=0; 34 34 closed=[]; 35 if nargin>1, 36 isexist=1; 37 for i=1:nargin-1 38 filename=varargin{i}; 39 if ~exist(filename), 40 error(['expmaster error message:, ' filename ' does not exist. Exiting...']); 41 else 42 %read file 43 B=expread(filename,1); 44 %go through all profiles of B 45 for i=1:size(B,2) 46 %plug profile in A 47 if numprofiles 48 A(numprofiles+1)=B(i); 49 else 50 A=B(i); 51 end 52 %update numprofiles and numpoints 53 numpoints=numpoints+length(B(i).x); 54 numprofiles=numprofiles+1; 55 %figure out if the profile is closed or not 56 if (B(i).x(1)==B(i).x(end) & B(i).y(1)==B(i).y(end)) 57 closed(numprofiles)=1; 58 else 59 closed(numprofiles)=0; 60 end 35 for i=1:nargin-1 36 filename=varargin{i}; 37 if ~exist(filename), 38 error(['expmaster error message:, ' filename ' does not exist. Exiting...']); 39 else 40 %read file 41 B=expread(filename,1); 42 %go through all profiles of B 43 for i=1:size(B,2) 44 %plug profile in A 45 if numprofiles 46 A(numprofiles+1)=B(i); 47 else 48 A=B(i); 61 49 end 62 end 63 end 64 else 65 isexist=0; 50 %update numprofiles and numpoints 51 numpoints=numpoints+length(B(i).x); 52 numprofiles=numprofiles+1; 53 %figure out if the profile is closed or not 54 if (B(i).x(1)==B(i).x(end) & B(i).y(1)==B(i).y(end)) 55 closed(numprofiles)=1; 56 else 57 closed(numprofiles)=0; 58 end 59 end 60 end 66 61 end 67 62 … … 69 64 [path root ext ver]=fileparts(newfile); 70 65 71 %Figure out how nany plots have been done so far 72 g=get(gca,'children'); 73 prevplot=length(g); 74 prevplot2=prevplot; 66 %get current figure 67 set(gcf,'Renderer','zbuffer'); %fixes a bug on Mac OS X (not needed in future Matlab version 68 F=getframe(gca); 69 F=F.cdata; 70 %get current axis 71 xlim=get(gca,'Xlim'); 72 ylim=get(gca,'Ylim'); 73 %recreate x_m and y_m 74 x_m=linspace(xlim(1),xlim(2),size(F,2)); 75 y_m=linspace(ylim(2),ylim(1),size(F,1)); %getframe reverse axis... 76 %plot the data in another figure 77 figure 78 imagesc(x_m,y_m,F); set(gca,'Ydir','normal'); 75 79 76 80 %plot existing profile if any 81 prevplot=1; 82 prevplot2=1; 77 83 hold on 78 84 if numprofiles … … 94 100 while loop 95 101 96 %is there a profile in A? 97 if isexist 98 99 %Go through A and rule out the empty profiles 100 list=[]; 101 for i=1:size(A,2); 102 if length(A(i).x)==0 103 list(end+1)=i; 104 numprofiles=numprofiles-1; 105 end 106 end 107 A(list)=[]; 108 closed(list)=[]; 109 110 %display menu 111 title('Main Menu','FontSize',14); 112 button=menu('Menu','add a profile',... %1 113 'remove a profile',... %2 114 'modify the position of a point',... %3 115 'add points inside a profile',... %4 116 'add points at the end of a profile',...%5 117 'remove points',... %6 118 'remove several points',... %7 119 'cut a segment',... %8 120 'cut a large area',... %9 121 'merge profiles',... %10 122 'close profile',... %11 123 'undo',... %12 124 'redo',... %13 125 'quit'); %14 126 127 128 %UNDO?? 129 if button==12; 130 if counter==1 131 disp('Already at oldest change'); 132 else 133 counter=counter-1; 134 A=backup{counter,1}; 135 numprofiles=backup{counter,2}; 136 numpoints=backup{counter,3}; 137 closed=backup{counter,4}; 138 end 139 end 140 141 %REDO?? 142 if button==13 143 if counter==size(backup,1) 144 disp('Already at newest change'); 145 else 146 counter=counter+1; 147 A=backup{counter,1}; 148 numprofiles=backup{counter,2}; 149 numpoints=backup{counter,3}; 150 closed=backup{counter,4}; 151 end 152 end 153 154 switch button 102 %Go through A and rule out the empty profiles 103 list=[]; 104 for i=1:size(A,2); 105 if length(A(i).x)==0 106 list(end+1)=i; 107 numprofiles=numprofiles-1; 108 end 109 end 110 A(list)=[]; 111 closed(list)=[]; 112 113 %display menu 114 title('Main Menu','FontSize',14); 115 button=menu('Menu','add a profile (open)',...%1 116 'add a contour (closed)',... %2 117 'remove a profile',... %3 118 'modify the position of a point',... %4 119 'add points inside a profile',... %5 120 'add points at the end of a profile',... %6 121 'remove points',... %7 122 'remove several points',... %8 123 'cut a segment',... %9 124 'cut a large area',... %10 125 'merge profiles',... %11 126 'close profile',... %12 127 'undo',... %13 128 'redo',... %14 129 'quit'); %15 130 131 132 %UNDO?? 133 if button==13; 134 if counter==1 135 disp('Already at oldest change'); 136 else 137 counter=counter-1; 138 A=backup{counter,1}; 139 numprofiles=backup{counter,2}; 140 numpoints=backup{counter,3}; 141 closed=backup{counter,4}; 142 end 143 end 144 145 %REDO?? 146 if button==14 147 if counter==size(backup,1) 148 disp('Already at newest change'); 149 else 150 counter=counter+1; 151 A=backup{counter,1}; 152 numprofiles=backup{counter,2}; 153 numpoints=backup{counter,3}; 154 closed=backup{counter,4}; 155 end 156 end 157 158 switch button 155 159 156 160 case 1 … … 165 169 case 2 166 170 171 [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot2,root); 172 counter=counter+1; 173 backup{counter,1}=A; 174 backup{counter,2}=numprofiles; 175 backup{counter,3}=numpoints; 176 backup{counter,4}=closed; 177 178 case 3 179 167 180 [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot2,root); 168 181 counter=counter+1; … … 172 185 backup{counter,4}=closed; 173 186 174 case 3187 case 4 175 188 176 189 [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root); … … 181 194 backup{counter,4}=closed; 182 195 183 case 4196 case 5 184 197 185 198 [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root); … … 190 203 backup{counter,4}=closed; 191 204 192 case 5205 case 6 193 206 194 207 [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot2,root); … … 199 212 backup{counter,4}=closed; 200 213 201 case 6214 case 7 202 215 203 216 [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root); … … 208 221 backup{counter,4}=closed; 209 222 210 case 7223 case 8 211 224 212 225 [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root); … … 217 230 backup{counter,4}=closed; 218 231 219 case 8232 case 9 220 233 221 234 [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root); … … 226 239 backup{counter,4}=closed; 227 240 228 case 9241 case 10 229 242 230 243 [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root); … … 235 248 backup{counter,4}=closed; 236 249 237 case 1 0250 case 11 238 251 239 252 [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root); … … 245 258 246 259 247 case 1 1260 case 12 248 261 249 262 [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root); … … 254 267 backup{counter,4}=closed; 255 268 256 %QUIT257 case 1 4269 %QUIT 270 case 15 258 271 259 272 loop=0; … … 263 276 %do nothing 264 277 265 end 266 267 %no argus file has been given in input, go to addcontour directly 268 else 269 [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot2,root); 270 counter=counter+1; 271 backup{counter,1}=A; 272 backup{counter,2}=numprofiles; 273 backup{counter,3}=numpoints; 274 backup{counter,4}=closed; 275 isexist=1; 276 end 277 278 %Now erase all that have been done and plot the new structure A as it is 279 undoplots(prevplot); 278 end 279 280 %Now erase all that have been done and plot the new structure A as it is 281 undoplots(prevplot); 280 282 if numprofiles 283 prevplot2=1; 281 284 for i=1:numprofiles 282 285 plot(A(i).x,A(i).y,'-r','MarkerSize',10); … … 289 292 290 293 %write contour using expwrite 291 title('New file written, exiting ','FontSize',14);294 title('New file written, exiting...','FontSize',14); 292 295 if isempty(A) 293 296 disp('Profile empty, no file written') … … 295 298 expwrite(A,newfile); 296 299 end 300 301 %close window 302 close; -
issm/trunk/src/m/utils/Exp/ginputquick.m
r1 r33 21 21 22 22 % Copyright 1984-2005 The MathWorks, Inc. 23 % $Revision: 1. 2 $ $Date: 2009/03/27 00:44:53$23 % $Revision: 1.1 $ $Date: 2009/04/03 22:56:26 $ 24 24 25 25 out1 = []; out2 = []; out3 = []; y = []; -
issm/trunk/src/m/utils/Exp/manipulation/addendprofile.m
r1 r33 10 10 %some checks 11 11 if numprofiles==0 12 disp('no profile present ')12 disp('no profile present, exiting...') 13 13 return 14 14 end -
issm/trunk/src/m/utils/Exp/manipulation/addinsideprofile.m
r1 r33 10 10 %some checks 11 11 if numprofiles==0 12 disp('no profile present ')12 disp('no profile present, exiting...') 13 13 return 14 14 end 15 15 if numpoints<2 16 disp('at least two points are required ')16 disp('at least two points are required, exiting...') 17 17 return 18 18 end … … 39 39 %check that at least one segment exists 40 40 if indsel==0 41 disp('at least two points in one profile are required ')41 disp('at least two points in one profile are required, exiting...') 42 42 return 43 43 end -
issm/trunk/src/m/utils/Exp/manipulation/closeprofile.m
r1 r33 22 22 while loop 23 23 24 %some checks, 25 if numprofiles==0 26 disp('no profile present, exiting...') 27 return 28 end 29 if ~any(~closed), 30 disp('All the profiles are closed, exiting...') 31 return 32 end 33 24 34 [xi,yi] = ginput(1); 25 35 … … 30 40 31 41 if ismember(profsel,selection) 32 %profile was in selection, close it42 %profile was in selection, remove it from the selection 33 43 selection(find(selection==profsel))=[]; 34 44 %back to red 35 45 plot(A(profsel).x,A(profsel).y,'-r','MarkerSize',10); 46 elseif closed(profsel), 47 %profile already closed, do nothing 48 disp('selected profile aready closed, make another selection'), 36 49 else 37 50 %add the profile to the list to be closed … … 43 56 %close the profiles 44 57 for i=1:length(selection), 45 if (A(selection(i)).x(end)~=A(selection(i)).x(1) | A(selection(i)).y(end)~=A(selection(i)).y(1)) 46 A(selection(i)).x(end+1)=A(selection(i)).x(1); 47 A(selection(i)).y(end+1)=A(selection(i)).y(1); 48 numpoints=numpoints+1; 49 closed(selection(i))=1; 50 else 51 disp('one profile is already closed') 52 end 58 A(selection(i)).x(end+1)=A(selection(i)).x(1); 59 A(selection(i)).y(end+1)=A(selection(i)).y(1); 60 numpoints=numpoints+1; 61 closed(selection(i))=1; 53 62 end 54 63 loop=0; -
issm/trunk/src/m/utils/Exp/manipulation/cutarea.m
r1 r33 26 26 %some checks 27 27 if numprofiles==0 28 disp('no profile present ')28 disp('no profile present, exiting...') 29 29 return 30 30 end 31 31 if numpoints<3 32 disp('at least two points are needed ')32 disp('at least two points are needed, exiting...') 33 33 return 34 34 end … … 131 131 end 132 132 end 133 133 134 %plot new profile 134 135 undoplots(prevplot); … … 137 138 end 138 139 points=[]; 140 139 141 end 140 142 end -
issm/trunk/src/m/utils/Exp/manipulation/cutprofile.m
r1 r33 10 10 %some checks 11 11 if numprofiles==0 12 disp('no profile present ')12 disp('no profile present, exiting...') 13 13 return 14 14 end -
issm/trunk/src/m/utils/Exp/manipulation/mergeprofiles.m
r1 r33 1 1 function [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root); 2 %MERGEPROFILES - m orge profiles2 %MERGEPROFILES - merge profiles 3 3 % 4 4 % this script is used by expmaster as an elementary operation … … 9 9 % [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root) 10 10 11 12 11 hold on 12 loop=1; 13 13 14 %Take all the tips coordinates 15 tips=zeros(2*numprofiles,4); 16 for i=1:numprofiles 14 %Take all the tips coordinates of open profiles 15 counter=1; tips=[]; 16 for i=1:numprofiles 17 if ~closed(i), 17 18 %x and y coord, profile number, 1 if beginning, 2 and if end 18 tips(2*i-1,:)=[A(i).x(1) A(i).y(1) i 1]; 19 tips(2*i,:) = [A(i).x(end) A(i).y(end) i 2]; 19 if length(A(i).x)==1, 20 tips(counter,:)=[A(i).x(1) A(i).y(1) i 1]; 21 counter=counter+1; 22 else 23 tips(counter,:)=[A(i).x(1) A(i).y(1) i 1]; 24 tips(counter+1,:) = [A(i).x(end) A(i).y(end) i 2]; 25 counter=counter+2; 26 end 20 27 end 21 %remove the closed profiles fron the list 22 tips([2*find(closed)-1;2*find(closed)],:)=[]; 28 end 23 29 30 if size(tips,1)<2 31 disp('at least one unclosed profile is required') 32 return 33 end 34 35 %plot the tips 36 plot(tips(:,1),tips(:,2),'rs','Markersize',10); 37 firsttip=1; 38 39 %loop (at least 2 clicks needed) 40 while loop 41 42 %some checks 24 43 if size(tips,1)<2 25 44 disp('at least one unclosed profiles are required') … … 27 46 end 28 47 29 %plot the tips 30 plot(tips(:,1),tips(:,2),'rs','Markersize',10); 31 firsttip=1; 48 %select a point 49 if firsttip 50 title('click on the first tip, RETURN to exit','FontSize',14) 51 else 52 title('click on the second tip, RETURN to exit','FontSize',14) 53 end 32 54 33 %loop (at least 2 clicks needed) 34 while loop 35 36 %some checks 37 if size(tips,1)<2 38 disp('at least one unclosed profiles are required') 39 return 40 end 55 [xi,yi] = ginput(1); 41 56 42 %select a point 57 if ~isempty(xi) 58 43 59 if firsttip 44 title('click on the first tip, RETURN to exit','FontSize',14) 60 %find the selected tip 61 distance=(xi-tips(:,1)).^2+(yi-tips(:,2)).^2; 62 [dmin tip1]=min(distance); 63 numprofile1=tips(tip1,3); 64 firsttip=0; 65 66 %remove tip1 from tips list 67 newtips=tips; 68 newtips(tip1,:)=[]; 69 70 %plot selected tip 71 plot(tips(tip1,1),tips(tip1,2),'bs','MarkerSize',10); 72 plot(A(numprofile1).x,A(numprofile1).y,'-g'); 73 74 %second selection 45 75 else 46 title('click on the second tip, RETURN to exit','FontSize',14) 47 end 76 distance=(xi-newtips(:,1)).^2+(yi-newtips(:,2)).^2; 77 [dmin tip2]=min(distance); 78 numprofile2=newtips(tip2,3); 48 79 49 [xi,yi] = ginput(1); 80 if numprofile1==numprofile2 81 %close the profile 82 A(numprofile1).x(end+1)=A(numprofile1).x(1); 83 A(numprofile1).y(end+1)=A(numprofile1).y(1); 84 numpoints=numpoints+1; 85 closed(numprofile1)=1; 50 86 51 if ~isempty(xi)87 else 52 88 53 if firsttip 54 %find the selected tip 55 distance=(xi-tips(:,1)).^2+(yi-tips(:,2)).^2; 56 [dmin tip1]=min(distance); 57 numprofile1=tips(tip1,3); 58 firsttip=0; 89 if tips(tip1,4)==1 & newtips(tip2,4)==1, 90 A(numprofile1).x=[flipud(A(numprofile2).x); A(numprofile1).x]; 91 A(numprofile1).y=[flipud(A(numprofile2).y); A(numprofile1).y]; 92 numprofiles=numprofiles-1; 59 93 60 %remove tip1 grom tips list 61 newtips=tips; 62 newtips(tip1,:)=[]; 94 elseif tips(tip1,4)==1 & newtips(tip2,4)==2, 95 A(numprofile1).x=[A(numprofile2).x; A(numprofile1).x]; 96 A(numprofile1).y=[A(numprofile2).y; A(numprofile1).y]; 97 numprofiles=numprofiles-1; 63 98 64 %plot selected tip 65 plot(tips(tip1,1),tips(tip1,2),'bs','MarkerSize',10); 66 plot(A(numprofile1).x,A(numprofile1).y,'-g'); 99 elseif tips(tip1,4)==2 & newtips(tip2,4)==1, 100 A(numprofile1).x=[A(numprofile1).x; A(numprofile2).x]; 101 A(numprofile1).y=[A(numprofile1).y; A(numprofile2).y]; 102 numprofiles=numprofiles-1; 67 103 68 %second selection 69 else 70 distance=(xi-newtips(:,1)).^2+(yi-newtips(:,2)).^2; 71 [dmin tip2]=min(distance); 72 numprofile2=newtips(tip2,3); 73 74 %reverse if necessary 75 if numprofile2<numprofile1 76 fakeprofile=numprofile2; 77 numprofile2=numprofile1; 78 numprofile1=fakeprofile; 104 elseif tips(tip1,4)==2 & newtips(tip2,4)==2, 105 A(numprofile1).x=[A(numprofile1).x; flipud(A(numprofile2).x)]; 106 A(numprofile1).y=[A(numprofile1).y; flipud(A(numprofile2).y)]; 107 numprofiles=numprofiles-1; 79 108 end 80 109 81 if numprofile1==numprofile2 82 %close the profile 83 A(numprofile1).x(end+1)=A(numprofile1).x(1); 84 A(numprofile1).y(end+1)=A(numprofile1).y(1); 85 numpoints=numpoints+1; 86 closed(numprofile1)=1; 110 %delete profile2 111 A(numprofile2)=[]; 112 closed(numprofile2)=[]; 87 113 88 else114 end 89 115 90 if tips(tip1,4)==1 & newtips(tip2,4)==1, 91 A(numprofile1).x=[flipud(A(numprofile2).x); A(numprofile1).x]; 92 A(numprofile1).y=[flipud(A(numprofile2).y); A(numprofile1).y]; 93 numprofiles=numprofiles-1; 94 closed(numprofile1)=1; 116 %update tips 117 counter=1; tips=[]; 118 for i=1:numprofiles 119 if ~closed(i), 120 %x and y coord, profile number, 1 if beginning, 2 and if end 121 if length(A(i).x)==1, 122 tips(counter,:)=[A(i).x(1) A(i).y(1) i 1]; 123 counter=counter+1; 124 else 125 tips(counter,:)=[A(i).x(1) A(i).y(1) i 1]; 126 tips(counter+1,:) = [A(i).x(end) A(i).y(end) i 2]; 127 counter=counter+2; 128 end 129 end 130 end 95 131 96 elseif tips(tip1,4)==1 & newtips(tip2,4)==2, 97 A(numprofile1).x=[A(numprofile2).x; A(numprofile1).x]; 98 A(numprofile1).y=[A(numprofile2).y; A(numprofile1).y]; 99 numprofiles=numprofiles-1; 100 closed(numprofile1)=1; 132 %plot new profile 133 undoplots(prevplot); 134 for i=1:numprofiles 135 plot(A(i).x,A(i).y,'-r','MarkerSize',10); 136 end 137 if ~isempty(tips) 138 plot(tips(:,1),tips(:,2),'rs','Markersize',10); 139 end 101 140 102 elseif tips(tip1,4)==2 & newtips(tip2,4)==1, 103 A(numprofile1).x=[A(numprofile1).x; A(numprofile2).x]; 104 A(numprofile1).y=[A(numprofile1).y; A(numprofile2).y]; 105 numprofiles=numprofiles-1; 106 closed(numprofile1)=1; 107 108 elseif tips(tip1,4)==2 & newtips(tip2,4)==2, 109 A(numprofile1).x=[A(numprofile1).x; flipud(A(numprofile2).x)]; 110 A(numprofile1).y=[A(numprofile1).y; flipud(A(numprofile2).y)]; 111 numprofiles=numprofiles-1; 112 closed(numprofile1)=1; 113 end 114 115 %delete profile2 116 A(numprofile2)=[]; 117 closed(numprofile2)=[]; 118 119 end 120 121 %update tips 122 tips=newtips; 123 tips(tip2,:)=[]; 124 tips(find(tips(:,3)==numprofile2),3)=numprofile1; 125 126 %plot new profile 127 undoplots(prevplot); 128 for i=1:numprofiles 129 plot(A(i).x,A(i).y,'-r','MarkerSize',10); 130 end 131 plot(tips(:,1),tips(:,2),'rs','Markersize',10); 132 133 %back to beginning 134 firsttip=1; 135 end 136 else 137 %RETRUN-> quit 138 loop=0; 141 %back to beginning 142 firsttip=1; 139 143 end 144 else 145 %RETRUN-> quit 146 loop=0; 140 147 end 141 148 end -
issm/trunk/src/m/utils/Exp/manipulation/modifyposition.m
r1 r33 10 10 %some checks 11 11 if numprofiles==0 12 disp('no profile present ')12 disp('no profile present, exiting..') 13 13 return 14 14 end -
issm/trunk/src/m/utils/Exp/manipulation/removepoints.m
r1 r33 10 10 %some checks 11 11 if numprofiles==0 12 disp('no profile present ')12 disp('no profile present, exiting...') 13 13 return 14 14 end -
issm/trunk/src/m/utils/Exp/manipulation/removeprofile.m
r1 r33 18 18 %some checks 19 19 if numprofiles==0 20 disp('no profile to be removed ')20 disp('no profile to be removed, exiting...') 21 21 return 22 22 end -
issm/trunk/src/m/utils/Exp/manipulation/removeseveralpoints.m
r1 r33 10 10 %some checks 11 11 if numprofiles==0 12 disp('no profile present ')12 disp('no profile present, exiting...') 13 13 return 14 14 end 15 15 if numpoints<3 16 disp('at least two points are needed')16 disp('at least 3 points are required, exiting...') 17 17 return 18 18 end … … 29 29 %loop (at least 3 clicks needed) 30 30 while loop 31 32 %some checks 33 if numpoints<3 34 disp('at least 3 points are required, exiting...') 35 return 36 end 31 37 32 38 %select a point … … 54 60 text(A(selection).x(indsel),A(selection).y(indsel),num2str(1),'FontSize',14,'background',[0.7 0.7 0.9]); 55 61 end 62 %disp(['p1= ' num2str(indsel)]), 56 63 else 57 64 %get the 2d or 3d point for the given contou … … 64 71 points(end+1)=indsel; 65 72 text(A(selection).x(indsel),A(selection).y(indsel),num2str(2),'FontSize',14,'background',[0.7 0.7 0.9]); 73 %disp(['p2= ' num2str(indsel)]), 66 74 %third click? 67 75 else 68 76 p1=points(1); p2=points(2); p3=indsel; 77 %disp(['p3= ' num2str(indsel)]), 69 78 if p1<p2 70 79 if p3>p1 & p3<p2 … … 72 81 A(selection).y(p1+1:p2-1)=[]; 73 82 numpoints=numpoints-(p2-p1-1); 74 loop=0;75 83 else 76 84 A(selection).x=A(selection).x(p1:p2); … … 83 91 numpoints=numpoints+1; 84 92 end 85 loop=0;86 93 end 87 94 else … … 90 97 A(selection).y(p2+1:p1-1)=[]; 91 98 numpoints=numpoints-(p1-p2-1); 92 loop=0;93 94 99 else 95 100 A(selection).x=A(selection).x(p2:p1); … … 102 107 numpoints=numpoints+1; 103 108 end 104 loop=0;105 109 end 106 110 end 111 112 %plot new profiles 113 undoplots(prevplot); 114 for i=1:numprofiles 115 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 116 end 117 points=[]; 118 107 119 end 108 120 end -
issm/trunk/src/m/utils/Nightly/nightlyrun.m
r1 r33 5 5 6 6 %Go to Test directory 7 eval(['cd ' ISSM_DIR '/test s/']);7 eval(['cd ' ISSM_DIR '/test/']); 8 8 9 9 %Run all verification tests -
issm/trunk/src/m/utils/UpdateArchive/updatearchive.m
r1 r33 6 6 7 7 %Go to Test directory 8 eval(['cd ' ISSM_DIR '/ Tests/']);8 eval(['cd ' ISSM_DIR '/test/']); 9 9 10 10 %Run all verification tests
Note:
See TracChangeset
for help on using the changeset viewer.