Plotting 2D Sensor data with the same value on X-axis
19 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Star Strider
2017-11-13
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

