Info

This question is closed. Reopen it to edit or answer.

Here is array file i am attaching, i want to plot only non-zero values without deleting zeros,

1 view (last 30 days)
here is an array file.
  1 Comment
KSSV
KSSV on 6 Dec 2016
You have asked same question here...<http://in.mathworks.com/matlabcentral/answers/315449-hi-guyz-i-need-a-help-i-have-an-array-that-contain-both-zero-and-non-zero-elemnts-but-i-want-to-p> You should have commented there? Why a new question?

Answers (1)

KSSV
KSSV on 6 Dec 2016
load array2 ;
idx = 1:length(n1) ;
plot(idx(n1~=0),n1(n1~=0),'r')

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!