MATLAB: How to delete empty cells in a cell array

delete cellsempty cellsshift cells

I would like to delete all of the empty {0×0 double} cells in each row, then shift the cells that have values in them to the left.
Starting with:
{["laterite-00001"]} {[ 30552]} {[ 227634]} {[ 123220]}
{["laterite-00002"]} {0×0 double} {0×0 double} {[1345]}
{["laterite-00003"]} {0×0 double} {0×0 double} {[443266]}
{["laterite-00004"]} {0×0 double} {0×0 double} {[87887]}
{["laterite-00005"]} {[1323]} {[87455]} {[23345]}
{["laterite-00006"]} {[43233]} {[454547]} {0×0 double}
I would like to end with this:
{["laterite-00001"]} {[30552]} {[227634]} {[123220]}
{["laterite-00002"]} {[1345]}
{["laterite-00003"]} {[443266]}
{["laterite-00004"]} {[87887]}
{["laterite-00005"]} {[1323]} {[87455]} {[23345]}
{["laterite-00006"]} {[43233]} {[454547]}

Best Answer

What you show us for input is a 6 x 4 cell array, some entries of which happen to contain empty arrays.
What you show us for desired output is something that does not exist in MATLAB: a rectangular cell array with "holes". Some people refer to this as a "ragged" array.
The closest you can get in MATLAB is that you could make a 6 x 1 cell array, each entry of which was a cell array:
{{"laterite-00001" 30552 227634 123220}
{"laterite-00002" 1345}
...
}