I have an array which looks similar to:
0 2 3 4 0 0 7 8 0 10 0 32 44 47 0 0 37 54 0 36
Here is a possible solution:
x(:,all(x==0))=[]