Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
Solved

Can someone advise how to draw a circle in Matlab

Posted on 2009-04-07
Medium Priority
2,915 Views

I want to draw a circle of 1 meter radius at f1 and a 11 meter at f2

I have tried to search in the help files but can't figure it out...

your help would be really appreciated.
``````clear % all variables
figure(1), hold off

Line1X=[-10,10];
Line1Y=[-10,-10];
Line2X=[10,0];
Line2Y=[-10,10];
Line3X=[-10,0];
Line3Y=[-10,10];
line(Line1X,Line1Y)
line(Line2X,Line2Y)
line(Line3X,Line3Y)
text(-10,-10,'\leftarrow f1 (x1,y1)','VerticalAlignment','middle','HorizontalAlignment','left')
text(10,-10,'\leftarrow f2 (x2,y2)','VerticalAlignment','middle','HorizontalAlignment','left')
text(0,10,'\leftarrow f3 (x3,y3)','VerticalAlignment','middle','HorizontalAlignment','left')
``````
screener.png
0
Question by:jtiernan2008
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

• Help others & share knowledge
• Earn cash & points
• 3
• 2

LVL 15

Expert Comment

ID: 24089457
Use CIRCLE function from Matlab file exchange:
http://www.mathworks.com/matlabcentral/fileexchange/2876

0

LVL 15

Accepted Solution

yuk99 earned 2000 total points
ID: 24089518
This is an example how to use CIRCLE function:
``````center=[0,0];
N=100; % number of points (circle resolution)
``````
0

LVL 1

Author Comment

ID: 24089728

I get an error
??? Undefined function or method 'circle' for input arguments of type 'double'.

Error in ==> triangle at 23
0

LVL 1

Author Comment

ID: 24089752
0

LVL 1

Author Closing Comment

ID: 31567605
thanks a million
that's really useful
0

Featured Post

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilationâ€¦