Info
This question is closed. Reopen it to edit or answer.
Hi, Guyz i need a help, i have an array that contain both zero and non-zero elemnts ,but i want to plot only non-zero elements without deleting zeros?
1 view (last 30 days)
Show older comments
Hi, Guyz i need a help, i have an array that contain both zero and non-zero elemnts ,but i want to plot only non-zero elements without deleting zeros?
0 Comments
Answers (1)
KSSV
on 5 Dec 2016
idx = length(data);
plot(idx(data~=0),data(data~=0))
where data is your array.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!