A more detailed question would allow a more detailed answer, but here is a basic step:
indexToNonZeroX = (x~=0); % There are many ways to do this
plot(x(indexToNonZeroX))
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!