plot and ignore certain values
Mostrar comentarios más antiguos
I have a vector I need to plot that contains numerics gathered from a data acquisition board collecting at 1 hz (1 point / sec).
any time signal is lost, a placeholder "-1" value is used in that cell and I need to plot this vector but not have it plot the "-1"s
is the plot function capable of such a task? or do I have to remove all the "-1"s first?
1 comentario
Nathaniel Menefee
el 10 de Mzo. de 2017
So i want to do that same thing but i want to do it with 2 different plots. is there any way to do this.
Respuesta aceptada
Más respuestas (1)
Wayne King
el 24 de Abr. de 2012
You can just plot x for x~= -1 or did you mean that the character array "-1" is entered? Not sure what you mean by the " ".
x = randi([-1 4],20,1);
plot(x(x~= -1))
1 comentario
David C
el 24 de Abr. de 2012
Categorías
Más información sobre 2-D and 3-D Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!