How to plot a continuous zero plot in Matlab?

Join the discussion
Registration is free. Start your own thread to ask a follow-up.
2 replies · 2K views
hokhani
Messages
653
Reaction score
29
In the plot command below
Code:
x=1:5:100
plot(x,y,x,0)

one plot is noncontinuous zero plot. How can I plot a continuous zero one?
 
Physics news on Phys.org
Try
Code:
x = 1:5:100;
plot(x, zeros(size(x));

(Same thing as Dr Transport suggested, except it makes sure the vector of zeros has the same size as x.)