Plotting 2D Sensor data with the same value on X-axis
19 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Albert Sagala
am 13 Nov. 2017
Kommentiert: Star Strider
am 14 Nov. 2017
Hi, I got the series of variable measurement from many points. So that, in one point of x-axis, there will be more more values existed. Below is the data example A B C -78 -77 -91 -77 -77 -90 -75 -77 -91 -78 -77 -92 -77 -77 -91 -76 -77 -91 -78 -77 -90 -78 -77 -91 -78 -77 -90 -76 -77 -88 -79 -77 -89 -77 -77 -92 -77 -77 -92 -77 -77 -90 -78 -77 -91 -78 -77 -92 -77 -77 -96 -77 -77 -94 -78 -77 -96 -78 -77 -92 -78 -77 -92 -79 -77 -91 -79 -77 -92 -79 -77 -89 -80 -77 -90 -79 -77 -88 -78 -77 -95 -77 -77 -92 -77 -77 -90 -79 -77 -91 -77 -77 -88 -78 -77 -90 -78 -77 -90 -78 -77 -96 -79 -77 -90 -77 -77 -87
I want to plot all the data with three categories A,B, and C. I start to try with plot (x,y), but I have no x in this date, except the categories.
0 Kommentare
Akzeptierte Antwort
Star Strider
am 13 Nov. 2017
I am not certain what you want.
Try this:
C = { 'A' 'B' 'C'};
V = [-78 -77 -91
-77 -77 -90
-75 -77 -91
-78 -77 -92
-77 -77 -91
-76 -77 -91
-78 -77 -90
-78 -77 -91
-78 -77 -90
-76 -77 -88
-79 -77 -89
-77 -77 -92
-77 -77 -92
-77 -77 -90
-78 -77 -91
-78 -77 -92
-77 -77 -96
-77 -77 -94
-78 -77 -96
-78 -77 -92
-78 -77 -92
-79 -77 -91
-79 -77 -92
-79 -77 -89
-80 -77 -90
-79 -77 -88
-78 -77 -95
-77 -77 -92
-77 -77 -90
-79 -77 -91
-77 -77 -88
-78 -77 -90
-78 -77 -90
-78 -77 -96
-79 -77 -90
-77 -77 -87];
figure(1)
plot((1:size(V,1)), V)
legend(C, 'Location','W')
4 Kommentare
Star Strider
am 14 Nov. 2017
My pleasure.
If my Answer helped you solve your problem, please Accept it!
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!

