Re: 2D Plots
- From: "petro " <visualnightmare@xxxxxxxxx>
- Date: Fri, 5 Dec 2008 06:47:01 +0000 (UTC)
"Anton " <sp6048@xxxxxx> wrote in message <gha0v6$amq$1@xxxxxxxxxxxxxxxxxx>...
New to MATLAB - simple question - how do I 'fix' the axes (so that they always intersect at (0,0), for example) in a 2D plot? EG: I want to plot a unit circle with axes intersecting at origin in middle of plot ...
Hi Anton ;
I found what you asked about ( drawing unity circle with axes intersecting at origin in middle of plot ) here there are two codes you could try :
1st code ( commonly used ) ( center (0,0) & radius = 1 )
th=0:0.1:2*pi;
x=1*cos(th);
y=1*sin(th);
plot(x,y)
grid
2nd code ( center (0,0) & radius = 1 ) but with equal scale of axis
Try both & note the differenceth=linspace(0,2*pi,1000);
x=1*cos(th);
y=1*sin(th);
plot(x,y)
grid
axis equal
I hope i had answered your question
.
- Follow-Ups:
- Re: 2D Plots
- From: Anton
- Re: 2D Plots
- References:
- 2D Plots
- From: Anton
- 2D Plots
- Prev by Date: Re: beginner's question (vectors and matrices)
- Next by Date: Free Domain Name for life. supports for CNAME, A, MX, NS records! - Full DNS control - URL forwarding
- Previous by thread: 2D Plots
- Next by thread: Re: 2D Plots
- Index(es):
Relevant Pages
|
Loading