function [ timevector ] = makevector( time, parameters )
%   MAKEVECTOR creates vector from time data and vector parameters
%   paramerers - trojice value, starttime, stoptime
timevector = [time zeros(size(time))];


for i = 1:3:length(parameters);
    if (parameters{i} ~= 0) && (parameters{i + 2} ~= 0) && (parameters{i + 1} < parameters{i + 2})
        indexstart = find(time >= parameters{i + 1});
        indexstart = indexstart(1);
        indexstop = find(time >= parameters{i + 2});
        if isempty(indexstop)
            indexstop = length(time);
        end
        indexstop = indexstop(1);
        timevector(indexstart:indexstop, 2) = parameters{i};
    end
end
end

