Changeset 3018
- Timestamp:
- 02/10/10 17:53:41 (15 years ago)
- Location:
- issm/trunk/src/m/utils/Exp
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/Exp/expconcatenate.m
r1 r3018 48 48 49 49 %call merge profile routine 50 [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root );50 [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root,options); 51 51 52 52 hold off -
issm/trunk/src/m/utils/Exp/expcut.m
r1 r3018 48 48 49 49 %call merge profile routine 50 [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root );50 [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root,options); 51 51 52 52 hold off -
issm/trunk/src/m/utils/Exp/expmaster.m
r2652 r3018 4 4 % this routine is used to create, modify, cut,... an Argus file (.exp) 5 5 % 6 % expmaster(newprofile )6 % expmaster(newprofile,'optionname',optionvalue) 7 7 % creation of an argus file newprofile 8 8 % 9 % expmaster(newprofile,oldprofile) 10 % the modification of the file oldprofile will be saved in newprofile 11 % 12 % expmaster(newprofile,oldprofile1,oldprofile2,...) 13 % the modification of the files oldprofile* will be saved in newprofile 9 % Available options: 10 % - include: include list of existing ARGUS files 11 % - color: line color (default='r') 12 % - selectioncolor: line color of selected profiles (default='b') 13 % - linestyle (default='-') 14 % - linewidth (default=1) 15 % - marker (default='s') 16 % - markersize (default=10) 17 % - markeredgecolor (default='r') 14 18 % 15 19 % Usage: 16 20 % expmaster(newfile,varargin) 21 % 22 % Example: 23 % expmaster('domain.exp','include',{'domain1.exp' 'domain2.exp'},'color','g','marker','+') 17 24 % 18 25 % See also EXPDOC … … 21 28 if ~nargin | nargout 22 29 error('expmaster usage: expmaster(newfile,varargin)') 23 elseif exist(newfile ),30 elseif exist(newfile,'file'), 24 31 %recursive call to expmaster if file already exists 25 32 if nargin==1, 26 expmaster(newfile, newfile);33 expmaster(newfile,'include',newfile,varargin{:}); 27 34 return; 28 35 end … … 36 43 end 37 44 45 %recover options 46 options=pairoptions(varargin{:}); 47 48 %Add default options 49 options=addfielddefault(options,'color','r'); 50 options=addfielddefault(options,'selectioncolor','b'); 51 options=addfielddefault(options,'LineStyle','-'); 52 options=addfielddefault(options,'LineWidth',1); 53 options=addfielddefault(options,'Marker','s'); 54 options=addfielddefault(options,'MarkerSize',10); 55 options=addfielddefault(options,'MarkerEdgeColor','r'); 56 38 57 %put all the argus profiles given in input in one structure A 39 58 A=struct([]); … … 41 60 numpoints=0; 42 61 closed=[]; 43 for i=1:nargin-1 44 filename=varargin{i}; 45 if ~exist(filename), 46 error(['expmaster error message:, ' filename ' does not exist. Exiting...']); 47 else 48 %read file 49 B=expread(filename,1); 50 %go through all profiles of B 51 for i=1:size(B,2) 52 %plug profile in A 53 if numprofiles 54 A(numprofiles+1)=B(i); 55 else 56 A=B(i); 57 end 58 %update numprofiles and numpoints 59 numpoints=numpoints+length(B(i).x); 60 numprofiles=numprofiles+1; 61 %figure out if the profile is closed or not 62 if (B(i).x(1)==B(i).x(end) & B(i).y(1)==B(i).y(end)) 63 closed(numprofiles)=1; 64 else 65 closed(numprofiles)=0; 62 63 %initialize the variables with files provided by 'include' option 64 if exist(options,'include'), 65 files=getfieldvalueerr(options,'include'); 66 if ischar(files), files={files}; end 67 for i=1:length(files), 68 filename=files{i}; 69 if ~exist(filename,'file'), 70 error(['expmaster error message:, ' filename ' does not exist. Exiting...']); 71 else 72 %read file 73 B=expread(filename,1); 74 %go through all profiles of B 75 for i=1:size(B,2) 76 %plug profile in A 77 if numprofiles 78 A(numprofiles+1)=B(i); 79 else 80 A=B(i); 81 end 82 %update numprofiles and numpoints 83 numpoints=numpoints+length(B(i).x); 84 numprofiles=numprofiles+1; 85 %figure out if the profile is closed or not 86 if (B(i).x(1)==B(i).x(end) & B(i).y(1)==B(i).y(end)) 87 closed(numprofiles)=1; 88 else 89 closed(numprofiles)=0; 90 end 66 91 end 67 92 end … … 96 121 97 122 %plot existing profile if any 98 99 123 hold on 100 if numprofiles101 for i=1:numprofiles102 plot(A(i).x,A(i).y,'-r','MarkerSize',10);103 end104 end105 124 106 125 %Build backup structre for do and redo … … 125 144 A(list)=[]; 126 145 closed(list)=[]; 146 147 %Now erase all that have been done and plot the new structure A as it is 148 undoplots(prevplot); 149 if numprofiles 150 prevplot2=1; 151 for i=1:numprofiles 152 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 153 prevplot2=prevplot2+1; 154 end 155 end 127 156 128 157 %display menu … … 175 204 case 1 176 205 177 [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot2,root );206 [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot2,root,options); 178 207 counter=counter+1; 179 208 backup{counter,1}=A; … … 184 213 case 2 185 214 186 [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot2,root );215 [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot2,root,options); 187 216 counter=counter+1; 188 217 backup{counter,1}=A; … … 193 222 case 3 194 223 195 [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot2,root );224 [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot2,root,options); 196 225 counter=counter+1; 197 226 backup{counter,1}=A; … … 202 231 case 4 203 232 204 [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root );233 [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root,options); 205 234 counter=counter+1; 206 235 backup{counter,1}=A; … … 211 240 case 5 212 241 213 [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root );242 [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 214 243 counter=counter+1; 215 244 backup{counter,1}=A; … … 220 249 case 6 221 250 222 [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot2,root );251 [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot2,root,options); 223 252 counter=counter+1; 224 253 backup{counter,1}=A; … … 229 258 case 7 230 259 231 [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root );260 [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root,options); 232 261 counter=counter+1; 233 262 backup{counter,1}=A; … … 238 267 case 8 239 268 240 [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root );269 [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root,options); 241 270 counter=counter+1; 242 271 backup{counter,1}=A; … … 247 276 case 9 248 277 249 [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root );278 [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 250 279 counter=counter+1; 251 280 backup{counter,1}=A; … … 256 285 case 10 257 286 258 [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root );287 [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root,options); 259 288 counter=counter+1; 260 289 backup{counter,1}=A; … … 265 294 case 11 266 295 267 [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root );296 [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root,options); 268 297 counter=counter+1; 269 298 backup{counter,1}=A; … … 275 304 case 12 276 305 277 [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root );306 [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 278 307 counter=counter+1; 279 308 backup{counter,1}=A; … … 293 322 end 294 323 295 %Now erase all that have been done and plot the new structure A as it is296 undoplots(prevplot);297 if numprofiles298 prevplot2=1;299 for i=1:numprofiles300 plot(A(i).x,A(i).y,'-r','MarkerSize',10);301 prevplot2=prevplot2+1;302 end303 end304 324 end 305 325 -
issm/trunk/src/m/utils/Exp/expselect.m
r1 r3018 49 49 50 50 %call merge profile routine 51 [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot,root );51 [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 52 52 53 53 hold off -
issm/trunk/src/m/utils/Exp/manipulation/addcontour.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %ADDCONTOUR - add a closed contour 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=addcontour(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 title('click to add a point to the new profile, RETURN to exit','FontSize',14) … … 25 25 %plot everything 26 26 undoplots(prevplot); 27 if length(x) 28 plot(x,y,'-rs','MarkerSize',10); 29 end 30 plot(x,y,'rs','MarkerSize',10); 31 plot(x(end),y(end),'rs','MarkerSize',14); 27 plot(x,y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 28 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 29 plot(x(end),y(end),'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize')+2,'Marker',getfieldvalueerr(options,'Marker')); 32 30 33 31 else -
issm/trunk/src/m/utils/Exp/manipulation/addendprofile.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %ADDENDPROFILE - add point at the end of a n existing profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=addendprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 48 48 %plot the selected profile 49 49 hold on 50 if length(x) 51 plot(x,y,'-rs','MarkerSize',10); 52 end 53 plot(x,y,'rs','MarkerSize',10); 54 plot(x(end),y(end),'rs','MarkerSize',14); 55 50 plot(x,y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 51 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 52 plot(x(end),y(end),'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize')+2,'Marker',getfieldvalueerr(options,'Marker')); 56 53 57 54 loop=1; 58 59 55 while loop 60 56 … … 69 65 %plot everything 70 66 undoplots(prevplot); 71 if length(x) 72 plot(x,y,'-rs','MarkerSize',10); 73 end 74 plot(x,y,'rs','MarkerSize',10); 75 plot(x(end),y(end),'rs','MarkerSize',14); 67 plot(x,y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 68 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 69 plot(x(end),y(end),'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize')+2,'Marker',getfieldvalueerr(options,'Marker')); 76 70 77 71 else -
issm/trunk/src/m/utils/Exp/manipulation/addinsideprofile.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %ADDINSIDEPROFILE - add apoint inside a profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=addinsideprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 18 18 end 19 19 hold on 20 loop=1;21 20 22 21 %plot squares 23 22 for i=1:numprofiles 24 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 23 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 24 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 25 25 end 26 26 27 loop=1; 27 28 while loop 28 29 … … 44 45 45 46 %highlight selected segment 46 plot([A(profsel).x(indsel) A(profsel).x(indsel+1)],[A(profsel).y(indsel) A(profsel).y(indsel+1)],'b-','MarkerSize',10); 47 plot([A(profsel).x(indsel) A(profsel).x(indsel+1)],[A(profsel).y(indsel) A(profsel).y(indsel+1)],... 48 'color',getfieldvalueerr(options,'selectioncolor'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 49 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 47 50 48 51 %next click … … 61 64 undoplots(prevplot); 62 65 for i=1:numprofiles 63 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 66 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 67 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 64 68 end 65 69 -
issm/trunk/src/m/utils/Exp/manipulation/addprofile.m
r1 r3018 1 function [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %ADDPROFILE - add a profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=addprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 title('click to add a point to the new profile, RETURN to exit','FontSize',14) … … 25 25 %plot everything 26 26 undoplots(prevplot); 27 if length(x) 28 plot(x,y,'-rs','MarkerSize',10); 29 end 30 plot(x,y,'rs','MarkerSize',10); 31 plot(x(end),y(end),'rs','MarkerSize',14); 27 plot(x,y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 28 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 29 plot(x(end),y(end),'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize')+2,'Marker',getfieldvalueerr(options,'Marker')); 32 30 33 31 else -
issm/trunk/src/m/utils/Exp/manipulation/closeprofile.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %CLOSEPROFILE - close one or several profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=closeprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 42 42 %profile was in selection, remove it from the selection 43 43 selection(find(selection==profsel))=[]; 44 %back to red 45 plot(A(profsel).x,A(profsel).y,'-r','MarkerSize',10); 44 %back to regular color 45 plot(A(profsel).x,A(profsel).y,... 46 'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 46 47 elseif closed(profsel), 47 48 %profile already closed, do nothing … … 50 51 %add the profile to the list to be closed 51 52 selection(end+1)=profsel; 52 %in blue 53 plot(A(profsel).x,A(profsel).y,'-b','MarkerSize',10); 53 %in selectioncolor 54 plot(A(profsel).x,A(profsel).y,... 55 'color',getfieldvalueerr(options,'selectioncolor'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 54 56 end 55 57 else -
issm/trunk/src/m/utils/Exp/manipulation/cutarea.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %CUTAREA - cut several point of a profile 3 3 % … … 9 9 % 10 10 % Usage: 11 % [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root )11 % [A,numprofiles,numpoints,closed]=cutarea(A,numprofiles,numpoints,closed,prevplot,root,options) 12 12 13 13 hold on … … 16 16 %plot squares 17 17 for i=1:numprofiles 18 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 18 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 19 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 19 20 end 20 21 … … 55 56 selection=profsel; 56 57 points(end+1)=indsel; 57 plot(A(selection).x,A(selection).y,'-b','MarkerSize',10); 58 plot(A(profsel).x,A(profsel).y,... 59 'color',getfieldvalueerr(options,'selectioncolor'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 58 60 text(A(selection).x(indsel),A(selection).y(indsel),num2str(1),'FontSize',14,'background',[0.7 0.7 0.9]); 59 61 end … … 135 137 undoplots(prevplot); 136 138 for i=1:numprofiles 137 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 139 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 140 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 138 141 end 139 142 points=[]; -
issm/trunk/src/m/utils/Exp/manipulation/cutprofile.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %CUTPROFILE - cut a profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=cutprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 18 18 end 19 19 hold on 20 loop=1;21 20 22 21 %plot squares 23 22 for i=1:numprofiles 24 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 23 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 24 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 25 25 end 26 26 27 loop=1; 27 28 while loop 28 29 … … 67 68 undoplots(prevplot); 68 69 for i=1:numprofiles 69 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 70 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 71 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 70 72 end 71 73 end -
issm/trunk/src/m/utils/Exp/manipulation/mergeprofiles.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %MERGEPROFILES - merge profiles 3 3 % … … 7 7 % 8 8 % Usage: 9 % [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root )9 % [A,numprofiles,numpoints,closed]=mergeprofiles(A,numprofiles,numpoints,closed,prevplot,root,options) 10 10 11 11 hold on … … 33 33 end 34 34 35 %plot the tips 36 plot(tips(:,1),tips(:,2),'rs','Markersize',10); 35 %plot the tips only 36 plot(tips(:,1),tips(:,2),... 37 'LineStyle','none','MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 37 38 firsttip=1; 38 39 … … 69 70 70 71 %plot selected tip 71 plot(tips(tip1,1),tips(tip1,2),'bs','MarkerSize',10); 72 plot(A(numprofile1).x,A(numprofile1).y,'-g'); 72 plot(tips(tip1,1),tips(tip1,2),... 73 'LineStyle','none','MarkerEdgeColor',getfieldvalueerr(options,'selectioncolor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 74 plot(A(numprofile1).x,A(numprofile1).y,... 75 'color',getfieldvalueerr(options,'selectioncolor'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 73 76 74 77 %second selection … … 133 136 undoplots(prevplot); 134 137 for i=1:numprofiles 135 plot(A(i).x,A(i).y,' -r','MarkerSize',10);138 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 136 139 end 137 140 if ~isempty(tips) 138 plot(tips(:,1),tips(:,2),'rs','Markersize',10); 141 plot(tips(:,1),tips(:,2),... 142 'LineStyle','none','MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 139 143 end 140 144 -
issm/trunk/src/m/utils/Exp/manipulation/modifyposition.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %MODIFYPOSITION - modify the prosition of a point of a profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=modifyposition(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 19 19 %plot squares 20 20 for i=1:numprofiles 21 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 21 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 22 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 22 23 end 23 24 … … 34 35 35 36 %plot the point in blue 36 plot(A(profsel).x(indsel),A(profsel).y(indsel),'bs','MarkerSize',10); 37 plot(A(profsel).x(indsel),A(profsel).y(indsel),... 38 'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 39 'MarkerEdgeColor',getfieldvalueerr(options,'selectioncolor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 37 40 38 41 %select new location … … 60 63 undoplots(prevplot); 61 64 for i=1:numprofiles 62 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 65 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 66 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 63 67 end 64 68 else -
issm/trunk/src/m/utils/Exp/manipulation/removepoints.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %REMOVEPOINTS - remove a point from a profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=removepoints(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 19 19 %plot squares 20 20 for i=1:numprofiles 21 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 21 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 22 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 22 23 end 23 24 … … 68 69 undoplots(prevplot); 69 70 for i=1:numprofiles 70 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 71 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 72 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 71 73 end 72 74 -
issm/trunk/src/m/utils/Exp/manipulation/removeprofile.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %REMOVEPROFILE - delete a profile 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=removeprofile(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 title('click on the profiles to be removed, RETURN to exit','FontSize',14) … … 32 32 %profile was in selection, remove it 33 33 selection(find(selection==profsel))=[]; 34 %back to red 35 plot(A(profsel).x,A(profsel).y,'-r','MarkerSize',10); 34 %back to regular color 35 plot(A(profsel).x,A(profsel).y,... 36 'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 36 37 else 37 38 %add the profile to the list to be removed 38 39 selection(end+1)=profsel; 39 %in blue 40 plot(A(profsel).x,A(profsel).y,'-b','MarkerSize',10); 40 %in selectioncolor 41 plot(A(profsel).x,A(profsel).y,... 42 'color',getfieldvalueerr(options,'selectioncolor'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 41 43 end 42 44 else -
issm/trunk/src/m/utils/Exp/manipulation/removeseveralpoints.m
r33 r3018 1 function [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root );1 function [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root,options); 2 2 %REMOVESEVERALPOINTS - remove several point 3 3 % … … 6 6 % 7 7 % Usage: 8 % [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root )8 % [A,numprofiles,numpoints,closed]=removeseveralpoints(A,numprofiles,numpoints,closed,prevplot,root,options) 9 9 10 10 %some checks … … 22 22 %plot squares 23 23 for i=1:numprofiles 24 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 24 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 25 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 25 26 end 26 27 … … 57 58 selection=profsel; 58 59 points(end+1)=indsel; 59 plot(A(selection).x,A(selection).y,'-b','MarkerSize',10); 60 plot(A(profsel).x,A(profsel).y,... 61 'color',getfieldvalueerr(options,'selectioncolor'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth')); 60 62 text(A(selection).x(indsel),A(selection).y(indsel),num2str(1),'FontSize',14,'background',[0.7 0.7 0.9]); 61 63 end … … 113 115 undoplots(prevplot); 114 116 for i=1:numprofiles 115 plot(A(i).x,A(i).y,'-rs','MarkerSize',10); 117 plot(A(i).x,A(i).y,'color',getfieldvalueerr(options,'color'),'LineStyle',getfieldvalueerr(options,'LineStyle'),'LineWidth',getfieldvalueerr(options,'LineWidth'),... 118 'MarkerEdgeColor',getfieldvalueerr(options,'MarkerEdgeColor'),'MarkerSize',getfieldvalueerr(options,'MarkerSize'),'Marker',getfieldvalueerr(options,'Marker')); 116 119 end 117 120 points=[];
Note:
See TracChangeset
for help on using the changeset viewer.