Changeset 842


Ignore:
Timestamp:
06/08/09 12:47:39 (15 years ago)
Author:
seroussi
Message:

optionnal subdivision parameter

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),
     1function [x_m2 y_m2 values2]=addtrack(x_m1,y_m1,values1,track_coord,track_values,distance,exponent,varargin),
    22%ADDTRACK - modify a map to take values of a track
    33%
     
    1515%
    1616%   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])
    1818%
    1919%   Example:
    2020%      [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)
    2122
    2223%Create a new picture precise enough to be modified by the tracks
     
    5253
    5354%Calculate the multiplicate factor for the new values:
    54 %mult=round((x_m1(2)-x_m1(1))/(1*dist_av));
    55 mult=3;
     55if nargin==7,
     56        mult=round((x_m1(2)-x_m1(1))/(1*dist_av));
     57else
     58        mult=varargin{1};
     59end
    5660
    5761%Plug the values in the new multiplied matrix
     
    102106%Loop over the points of the track
    103107nel=size(track_values,1);
    104 fprintf('%s','      track processing progress:  0.00 %');
     108fprintf('%s','      track processing progress:   0.00 %');
    105109for i=1:nel;
    106110        if mod(i,1000)==0,
    107111                fprintf('\b\b\b\b\b\b\b')
    108                 fprintf('%4.2f%s',i/nel*100,' %');
     112                fprintf('%5.2f%s',i/nel*100,' %');
    109113        end
    110114
     
    136140if nel>1000,
    137141        fprintf('\b\b\b\b\b\b\b\b')
    138         fprintf('%4.1f%s\n',100,' %');
     142        fprintf('%4.2f%s\n',100,' %');
    139143end
    140144
Note: See TracChangeset for help on using the changeset viewer.