Draw a Line Inside a Circle Matlab

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to annals. Registration is gratuitous. Click here to annals now.

  • Forums
  • EDA Theory
  • Elementary Electronic Questions
Yous are using an out of date browser. Information technology may non brandish this or other websites correctly.
You should upgrade or utilize an alternative browser.

[Matlab] How to draw a line in plot?

  • Thread starter davyzhu
  • Start date
Status
Non open for further replies.
  • #1
Joined
May 23, 2004
Messages
494
Helped
5
Reputation
10
Reaction score
ii
Trophy points
one,298
Location
oriental
Activeness points
four,436
matlab plot line

Hullo all,

How to draw a line in plot when I know the start signal(x1,y1) and cease bespeak(x2,y2)?

Cheers!
Davy

  • #2
Joined
Jul 22, 2004
Messages
467
Helped
86
Reputation
170
Reaction score
40
Trophy points
1,308
Activity points
3,422
matlab draw line

Hej Davy

Lets say y'all desire a line with coordinates (x1,y1) and (x2,y2). Then yous make a vector with the x and y coordinates: x = [x1 x2] and y=[y1 y2].
Matlab has a function called 'Line', this is used in this way:
line(x,y)
I generates a plot with the two points and a line that connects them.

Hopes this helped.

Regards

  • #3

mhamed

Advanced Fellow member level 4
Joined
Jul 28, 2004
Messages
114
Helped
10
Reputation
20
Reaction score
2
Bays points
1,298
Activity points
827
plot line matlab

no line office is neccessary. plot byitself make an linear interpolation between points and then just endeavor
plot([x1,x2],[y1,y2]).

  • #iv
Joined
Sep v, 2007
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
ane,312
draw line matlab

Hello!

I got a similar problem

I want to grade my initials (JCBD) but with a custom path. So I need to put some points in a plot and them connect them with lines so that the four letters are formed

how practice I exercise this?

  • #five
Joined
Feb 14, 2008
Letters
130
Helped
2
Reputation
four
Reaction score
2
Bays points
1,298
Location
Estonia
Activity points
two,281
matlab line plot

y=x is linear equation

It is on a ten axis

y=2x its going up

  • #half-dozen
Joined
Oct 22, 2005
Messages
296
Helped
27
Reputation
54
Reaction score
5
Bays points
i,298
Location
South Africa
Action points
three,462
plot line in matlab

I believe that the line(ten,y) funtion in matlab tin can be overloaded to be used every bit a 3D function and thus be used as line(10,y,z). As stated the plot function will linearly interpolate but sometimes this is not desired. As an example animation using the line function volition be more smooth than similar animations using the plot control. It all depends on what you want to do with the line.

Cheers
Slayer

  • #seven
Joined
May 30, 2008
Messages
i
Helped
1
Reputation
2
Reaction score
1
Trophy points
1,283
Activity points
1,294
describe line in matlab

Hither is a respond for ur Query......

just use the format

PLOT(X,Y) plots vector Y versus vector X. If X or Y is a matrix,
so the vector is plotted versus the rows or columns of the matrix,
whichever line up.
PLOT(Y) plots the columns of Y versus their alphabetize.
If Y is complex, PLOT(Y) is equivalent to PLOT(existent(Y),imag(Y)).
In all other uses of PLOT, the imaginary part is ignored.
Various line types, plot symbols and colors may be obtained with
PLOT(X,Y,S) where Southward is a character string made from i element
from any or all the post-obit iii colunms:
y yellow . point - solid
k magenta o circle : dotted
c cyan 10 x-mark -. dashdot
r ruddy + plus -- dashed
grand greenish * star
b blue southward foursquare
w white d diamond
k black v triangle (down)
^ triangle (up)
< triangle (left)
> triangle (right)
p pentagram
h hexagram
For example, PLOT(Ten,Y,'c+:') plots a cyan dotted line with a plus
at each information point; PLOT(X,Y,'bd') plots bluish diamond at each data
point but does non draw any line.
PLOT(X1,Y1,S1,X2,Y2,S2,X3,Y3,S3,...) combines the plots defined by
the (X,Y,S) triples, where the Ten's and Y's are vectors or matrices
and the S's are strings.
For case, PLOT(10,Y,'y-',X,Y,'get') plots the data twice, with a
solid yellow line interpolating green circles at the data points.

  • #8

echo47

Avant-garde Member level 5
Joined
Apr 7, 2002
Letters
3,942
Helped
638
Reputation
1,274
Reaction score
89
Trophy points
1,328
Location
The states
Activity points
33,176
how to draw a line in matlab

aztroboy, hither's a uncomplicated letter of the alphabet 'J'. You lot can expand information technology into more messages.

plot([five 5 iv 3 ii],[8 2 1 1 2],'chiliad', [four vi],[8 8],'m'); xlim([0 x]); ylim([0 10]);

  • #9
Joined
Feb 29, 2012
Messages
ane
Helped
0
Reputation
0
Reaction score
0
Bays points
1,281
Activity points
1,289
Re: how to describe a line in matlab
aztroboy, here's a simple letter 'J'. Yous can expand it into more than letters.

plot([v five iv 3 ii],[eight 2 1 1 2],'k', [iv 6],[8 viii],'m'); xlim([0 10]); ylim([0 10]);


thanks a lot faztroboy

past your answer I did this

xlim([v 100]); ylim([five 100]); ------:arrow:----- Draw (x,y) axis

plot([5 5 4 3 2],[8 2 1 1 2],'k', [4 6],[8 8],'g'); xlim([0 10]); ylim([0 10]); --:arrow:-- Draw (J) letter --- k is ( black color of line )

plot([5 5 4 3 2],[viii 2 one 1 ii],'R', [4 6],[8 8],'R'); xlim([0 ten]); ylim([0 x]);---:arrow:--- Describe (J) alphabetic character --- R is ( Red colour of line )

plot([4 vi],[viii eight],'R'); xlim([0 10]); ylim([0 10]); --:pointer:---- Draw strait line ----- Cherry-red color

plot([2 9],[five 5],'G',[2 9],[iv four],'R'); xlim([0 10]); ylim([0 10]); --:arrow:------ Draw ii straight lines ----- Reddish & blackness color

plot([four 8],[seven vii],'K',[four 4],[3 7],'R',[4 8],[iii 3],[8 8],[3 7],'R'); xlim([0 10]); ylim([0 ten]); --:arrow:-- Draw square

Condition
Not open for farther replies.

Similar threads

  • Forums
  • EDA Theory
  • Elementary Electronic Questions

battlecaphy1980.blogspot.com

Source: https://www.edaboard.com/threads/matlab-how-to-draw-a-line-in-plot.39183/

0 Response to "Draw a Line Inside a Circle Matlab"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel