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

Defining Axes in Matlab plotting

  1. Sep 18, 2011 #1
    Dear Fellows,

    I am plotting in matlab, and defined and axis along horizontal in such a way
    x=0:0.2:1.2;
    for
    plot (x, u,'re--' )
    but I need to define the limitation of u along vertical axis,,,,


    can any one suggest me the exact for range -5 to +1

    Regards
     
  2. jcsd
  3. Sep 18, 2011 #2

    Pythagorean

    User Avatar
    Gold Member

    well, you need to define u first, have you done that? I told you how to explicitly define the axes themselves in the other other thread where you asked this question, but if you're just looking at defining the ranges you can use the axis command:

    axis([xmin xmax ymin ymax])

    if you don't want to change the x limits, it's:

    axis([xlim ymin ymax])
     
  4. Sep 19, 2011 #3
    I have define the function u,
    x=0:0.2:1.2;
    axis([xlim 0 100])
    plot (x, u,'re--' )
    does not give any limitation of y axis,,,, all values are same as the one got without axis([xlim 0 100])
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Defining Axes in Matlab plotting
  1. Plotting in MATLAB (Replies: 8)

  2. Plotting with MATLAB (Replies: 1)

Loading...