Plotting graph with given points

386 次查看(过去 30 天)
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?

采纳的回答

Danny Alvarez
Danny Alvarez 2015-8-5
x=[2,3,8]; y=[15,8,30]; plot(x.y)
or
plot(x,y,'o') for dots
  4 个评论
Jorge Luis Dominguez Martinez
移动:DGM 2024-3-6
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 .

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 2-D and 3-D Plots 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by