Defining Axes in Matlab plotting

  • MATLAB
  • Thread starter adnan jahan
  • Start date
  • #1

Main Question or Discussion Point

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
 

Answers and Replies

  • #2
Pythagorean
Gold Member
4,191
253
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])
 
  • #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])
 

Related Threads for: Defining Axes in Matlab plotting

Replies
1
Views
4K
Replies
2
Views
6K
Replies
3
Views
1K
Replies
5
Views
6K
  • Last Post
Replies
8
Views
5K
  • Last Post
Replies
2
Views
3K
  • Last Post
Replies
1
Views
8K
  • Last Post
Replies
6
Views
1K
Top