function qout = storage_differentiate(q, order)

if nargin < 2
    order = 1;
end

if order > 1
    q = storage_differentiate(q, order-1);
end

qout.nr = q.nr-1;
qout.nc = q.nc;
qout.labels = q.labels;
qout.data = q.data(1:end-1,:);
DT = diff(q.data(:,1));
qout.data(:,2:end) = diff(q.data(:,2:end)) ./ (DT * ones(1,size(q.data,2)-1));
