ibike works great on the household windozer...but jeez, caint wee geat a litule linux supert?

Code: Select all
function ibike(ibikefile)
%ibike process iBike data file
% ibike(ibikefile) plots speed, power, and elevation data from an iBike
% data file in csv format.
%% load data from ibike file
data = csvread(ibikefile,5,0);
speed = data(:,1);
power = data(:,3);
distance = data(:,4);
elevation = data(:,7);
% calculate recording time interval
dt = round(mean((distance(2:11)-distance(1:10))./((speed(1:10)+speed(2:11))/2)*3600));
%% plot speed, power, and elevation profile
figure
subplot(3,1,1)
plot((1:length(speed))*(dt/60),speed)
xlabel('time (min)'); ylabel('speed (mph)')
subplot(3,1,2)
plot((1:length(power))*(dt/60),power)
xlabel('time (min)'); ylabel('power (W)')
subplot(3,1,3)
plot(distance,elevation)
xlabel('distance (mi)'); ylabel('elevation (ft)')
%% display average speed and power
disp(['Average speed (mph) => ',num2str(mean(speed))])
disp(['Average power (W) => ',num2str(mean(power))])
end