How to plot a continuous zero plot in Matlab?

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
hokhani
Messages
610
Reaction score
22
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.)