Plotting graph with given points

basically we always plot graph of certain function such as x = 0 : 1 : 10 y = sinx; plot(x,y,'-r^')
lets say given x = 2 y = 15 x = 3 y = 8 x = 8 y = 30 the point is random, how to plot this graph?

 采纳的回答

x=[2,3,8]; y=[15,8,30]; plot(x.y)
or
plot(x,y,'o') for dots

4 个评论

Odien
Odien 2015-8-5
移动:DGM 2024-3-6
after the graph is plot, how can we snip the following graph and paste it to mic.word?
If you have windows, use the snipping tool! Or, you can save the figure by clicking the save icon.
From the Graph window, you can go to File -> Save as
or click on Save Figure
and then select JPEG image (*jpg) as a type .
... and save it as a PNG, not a JPG. Never save plots as a JPG.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Line Plots 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by