- #1

- 33

- 0

Data for first graph is : [0.35,0],[0.4,130],[0.45,400],[0.5,0.11],[0.55,34] and so on.

Second graph is a function.

So, how to plot sequence of data in matlab? Which command should I use?

- Thread starter Elliptic
- Start date

- #1

- 33

- 0

Data for first graph is : [0.35,0],[0.4,130],[0.45,400],[0.5,0.11],[0.55,34] and so on.

Second graph is a function.

So, how to plot sequence of data in matlab? Which command should I use?

- #2

- 319

- 0

x = [0.35 0.4 0.45 0.5 0.55] % (defines the x values in a vector)

y = [0 130 400 0.11 34] % (defines the y values in a separate vector)

plot(x,y) % (makes a plot of y plotted against x)

- #3

- 33

- 0

how to display two plots plot1 and plot 2 in one graph? thank you

- #4

- 319

- 0

plot(x1,y1,x2,y2)

By the way, the MATLAB documentation is quite thorough. Try typing "help plot" to learn more about the syntax and features of the plot function. Also, there's a ton of information on the web about using MATLAB in case you ever get stuck.

- #5

- 39

- 0

#4 is right

- #6

- 39

- 0

wait...

plot(x1,y1,x2,y2)

By the way, the MATLAB documentation is quite thorough. Try typing "help plot" to learn more about the syntax and features of the plot function. Also, there's a ton of information on the web about using MATLAB in case you ever get stuck.

its' gonna be plotyy(x1,y1,x2,y2)

- Last Post

- Replies
- 1

- Views
- 864

- Last Post

- Replies
- 1

- Views
- 1K

- Last Post

- Replies
- 10

- Views
- 10K

- Last Post

- Replies
- 1

- Views
- 8K

- Last Post

- Replies
- 6

- Views
- 649

- Last Post

- Replies
- 2

- Views
- 1K

- Last Post

- Replies
- 1

- Views
- 2K

- Last Post

- Replies
- 1

- Views
- 550

- Last Post

- Replies
- 5

- Views
- 23K

- Last Post

- Replies
- 4

- Views
- 558