Changeset 842
- Timestamp:
- 06/08/09 12:47:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/m/utils/DataProcessing/addtrack.m
r841 r842 1 function [x_m2 y_m2 values2]=addtrack(x_m1,y_m1,values1,track_coord,track_values,distance,exponent ),1 function [x_m2 y_m2 values2]=addtrack(x_m1,y_m1,values1,track_coord,track_values,distance,exponent,varargin), 2 2 %ADDTRACK - modify a map to take values of a track 3 3 % … … 15 15 % 16 16 % Usage: 17 % [x_m2 y_m2 values1 values2]=addtrack(x_m1,y_m1,values1,track_coord,track_values,distance,exposant )17 % [x_m2 y_m2 values1 values2]=addtrack(x_m1,y_m1,values1,track_coord,track_values,distance,exposant[,subdivision]) 18 18 % 19 19 % Example: 20 20 % [xnew ynew valuesnew]=addtrack(x_m,y_m,thickness,'trackcoord.exp',thickness_track,1000,2) 21 % [xnew ynew valuesnew]=addtrack(x_m,y_m,thickness,'trackcoord.exp',thickness_track,1000,2,3) 21 22 22 23 %Create a new picture precise enough to be modified by the tracks … … 52 53 53 54 %Calculate the multiplicate factor for the new values: 54 %mult=round((x_m1(2)-x_m1(1))/(1*dist_av)); 55 mult=3; 55 if nargin==7, 56 mult=round((x_m1(2)-x_m1(1))/(1*dist_av)); 57 else 58 mult=varargin{1}; 59 end 56 60 57 61 %Plug the values in the new multiplied matrix … … 102 106 %Loop over the points of the track 103 107 nel=size(track_values,1); 104 fprintf('%s',' track processing progress: 0.00 %');108 fprintf('%s',' track processing progress: 0.00 %'); 105 109 for i=1:nel; 106 110 if mod(i,1000)==0, 107 111 fprintf('\b\b\b\b\b\b\b') 108 fprintf('% 4.2f%s',i/nel*100,' %');112 fprintf('%5.2f%s',i/nel*100,' %'); 109 113 end 110 114 … … 136 140 if nel>1000, 137 141 fprintf('\b\b\b\b\b\b\b\b') 138 fprintf('%4. 1f%s\n',100,' %');142 fprintf('%4.2f%s\n',100,' %'); 139 143 end 140 144
Note:
See TracChangeset
for help on using the changeset viewer.