How can I plot the following data? Do I have to convert it first to another form?
16 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
JJ
le 21 Juil 2024 à 20:49
Réponse apportée : Walter Roberson
le 21 Juil 2024 à 21:00
Hey All,
I'm trying to plot various graphs of the following data but I have no clue where to start. I've tried something like the following type of code.
x=zeros(1,10);
x(2:4) =1;
y= linspace(0,10,10);
plot(y,x)
But also tried:
plot(filledData(:,1,filledData(:,2))
I apologize if this is too much, complete beginner. Second day at it.
Thank you all,
JJ
1 commentaire
Walter Roberson
le 21 Juil 2024 à 20:59
plot(filledData(:,1,filledData(:,2))
1 2 3 21
You have one unclosed )
Réponse acceptée
Walter Roberson
le 21 Juil 2024 à 21:00
stem(filledData(:,1), filledData(:,2))
or perhaps
stairs(filledData(:,1), filledData(:,2))
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!