MATLAB: Delete null in matrix

MATLABmatrix

I have matrix M=[ 0 0 0 7.9286 10.1000 14.3714]
I want to delete null in matrix.
I want matrix M=[7.9286 10.1000 14.3714]
Thanks

Best Answer

M=[ 0 0 0 ; 7.9286 10.1000 14.3714]
M=M(all(M,2),:)