Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to plot a continuous zero plot in Matlab?

  1. Apr 5, 2015 #1
    In the plot command below
    Code (Text):

    x=1:5:100
    plot(x,y,x,0)
     
    one plot is noncontinuous zero plot. How can I plot a continuous zero one?
     
  2. jcsd
  3. Apr 5, 2015 #2

    Dr Transport

    User Avatar
    Science Advisor
    Gold Member

    define y1 = zeros([1 500]); and plot it...
     
  4. Apr 5, 2015 #3

    wle

    User Avatar

    Try
    Code (Text):
    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.)
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: How to plot a continuous zero plot in Matlab?
Loading...