So you know the bin edges and the bin counts? Call histogram with 'BinEdges' and 'BinCounts' along with the vectors of bin edges and bin counts.
binedges = (1:5).^2; % let's use some non-uniformly spaced edges
bincounts = [33 62 17 50]; % arbitrary values
histogram('BinEdges', binedges, 'BinCounts', bincounts)