summaryrefslogtreecommitdiffstats
path: root/Kod/bilbana/yc4/fit_percents.m
blob: ffdb9fce3c8ea8b12a29642728d8ba1ad70517c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
function [ new_percents ] = fit_percents( percents, lap_time, seg_times )
%FIT_PERCENTS Summary of this function goes here
%   Detailed explanation goes here
new_percents = [];
for i = 1:length(percents)
    old_p = percents(i);
    cur_p = seg_times(i) / lap_time;
    new_p = old_p - (old_p + cur_p) / 2;
    new_percents(i) = new_p;
end