I am not certain what your data are, or what you want to do.
One option for reducing the size of the array and still getting the plot is to use the find function to detect the 1 and 0 levels, and simply store them. Use the stem function to plot them. Another (likely more robust) option is to use the Signal Processing Toolbox midcross function to detect the pulses.
The find function might return something like this:
idx = [1 5 6 9 21 23 30 35 40];
that you could then plot as:
stem(idx, ones(size(idx)), 'Marker','none')