Plotting graph with given points

17 vues (au cours des 30 derniers jours)
Odien
Odien le 5 Août 2015
Commenté : DGM le 6 Mar 2024
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?

Réponse acceptée

Danny Alvarez
Danny Alvarez le 5 Août 2015
x=[2,3,8]; y=[15,8,30]; plot(x.y)
or
plot(x,y,'o') for dots
  4 commentaires
Jorge Luis Dominguez Martinez
Déplacé(e) : DGM le 6 Mar 2024
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 .
DGM
DGM le 6 Mar 2024
... and save it as a PNG, not a JPG. Never save plots as a JPG.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Line Plots dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by