MATLAB: How to create incrementing arrays from each row of a matrix

MATLABmatrix increment

I have a big table starts like this
A B
33 17
30 -4
26 14
25 14
I would like to get a new array containing the increments of the form (B:A) from each of the rows.
For instance (table.B(1):table.A(1)), (table.B(2):tableA(2)) and so on.
Is there a simple way to do this? Is a loop necessary?
Thank you

Best Answer

indices = arrayfun(@(x) Table.B(x):Table.A(x),1:size(B,1),'un',0);