how i plot specified point from signal ?

how i plot specific point from signal, for example: i want to plot just the points that have y different to zero?

5 个评论

plot(y(y~=0),'+') % plots point other than y=0
madhan ravi, in this case index of the points where that have y not a zero appear in linear successive 1 2 3 4, but in reality 1, 6 ,7
Please upload an example and your desired output so that it's clear you want to plot y against which parameter because if the x axis parameter is not defined then it's plotted against index.
New Bitmap Image.bmp
I want to draw the points that have different "y" a zero and keep his index in the original

请先登录,再进行评论。

 采纳的回答

If your data were plotted with
plot(x,y)
and you want to only plot data where y~=0, then first find the indices where y~=0 and eliminate them from both x and y.
yKeep = y~=0;
plot(x(yKeep), y(yKeep))
If you have data that are very close to 0 but not equal to zero (ie, 0.000001) and you want to eliminate them as well, use ismembertol().

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 Line Plots 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by