[p, q] = get_products(); % quantity sum over a day plot(sum(q')); % plot prediction quallity calc_error(q(29:42, :), mean_pred(q(1:28, :), 14)); calc_error(q(29:42, :), regress_pred(p, q(1:28, :))); calc_error(q(29:42, :), repmat(sevenday_pred(q(1:28, :), 4), 2, 1));