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.

采纳的回答

Star Strider
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 个评论
Star Strider
Star Strider 2017-11-14
My pleasure.
If my Answer helped you solve your problem, please Accept it!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Annotations 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by