MATLAB: How to build sequential cell rows

cell arrayssequential

2-column matrix .. left column has min. values .. right column has max. values .. for example B =
23 25
24 28
30 32
then i would like to generate the following
A =
23 24 25
24 25 26 27 28
30 31 32
the solution that worked is by using a for loop and assigning each row's solution into a new row of a cell
A{j} = B(j,1):B(j,2)
.. however i was hoping for a smarter solution to cut down the computatinoal time (it is a very large matrix !)

Best Answer

Actually, you can do it without a loop:
B = [23 25
24 28
30 32];
A = cellfun(@(x) {x(:,1):x(:,2)}, mat2cell(B,ones(size(B,1),1),size(B,2)));
celldisp(A) % Display Results (Delete Later)

A{1} =
23 24 25
A{2} =
24 25 26 27 28
A{3} =
30 31 32
EDIT To create a function version:
fillin = @(X) cellfun(@(x) {x(:,1):x(:,2)}, mat2cell(X,ones(size(X,1),1),size(X,2)));
A = fillin(B)
celldisp(A) % Display Results (Delete Later)
The output is the same as above.