Continuous plot(x,y) for discrete data points
Afficher commentaires plus anciens
When using plot(x,y) function, [say for example x = 1X20 matrix and y=sin(x), which means that there are only 20 data points), matlab plot comes out to be a continuous one. Is this always the case? I just started using matlab.
1 commentaire
Chandeesh
le 25 Juil 2022
Select the functions to represent the graph of a continuous and a discrete function.
Réponse acceptée
Plus de réponses (2)
Sean de Wolski
le 30 Déc 2013
Modifié(e) : Sean de Wolski
le 30 Déc 2013
plot is just connecting the points with lines. If you don't want this, you can specify the marker. For example, for a red *
>> plot(0:0.1:2*pi,sin(0:0.1:2*pi),'r*')
And for more info:
doc plot
1 commentaire
Vineet
le 30 Déc 2013
Anil
le 28 Déc 2022
1 vote
i only have one point for x and y how can i generate a continuous plot for this
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!