How can I plot the following data? Do I have to convert it first to another form?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
JJ
am 21 Jul. 2024
Beantwortet: Walter Roberson
am 21 Jul. 2024
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))
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1738896/image.png)
I apologize if this is too much, complete beginner. Second day at it.
Thank you all,
JJ
1 Kommentar
Walter Roberson
am 21 Jul. 2024
plot(filledData(:,1,filledData(:,2))
1 2 3 21
You have one unclosed )
Akzeptierte Antwort
Walter Roberson
am 21 Jul. 2024
stem(filledData(:,1), filledData(:,2))
or perhaps
stairs(filledData(:,1), filledData(:,2))
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Annotations finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!