Changeset 799 for trunk


Ignore:
Timestamp:
Jul 14, 2014, 2:12:41 PM (7 years ago)
Author:
sommeria
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/read_lvm.m

    r796 r799  
    6363    Speed=zeros(size(Data.Motor_profile));
    6464    if ~isempty(find(Data.Motor_profile>2.5|Data.Motor_profile<-2.5))
    65     Speed(Data.Motor_profile>2.5)=SpeeDown;% threshold at 2.5 to avoid noise effects
    66     Speed(Data.Motor_profile<-2.5)=SpeedUp;
    67     Data.Speed=Speed;
    68     Speed(end)=[];
    69     Data.Position=[0; cumsum(Speed.*diff(Data.Time))];
     65        Speed(Data.Motor_profile>2.5)=SpeedDown;% threshold at 2.5 to avoid noise effects
     66        Speed(Data.Motor_profile<-2.5)=SpeedUp;
     67        Data.Speed=Speed;
     68        Speed(end)=[];
     69        Data.Position=[0; cumsum(Speed.*diff(Data.Time))];
     70        Data.Position=Data.Position-min(Data.Position);% set minimum to 0
    7071    end
    7172end
Note: See TracChangeset for help on using the changeset viewer.