How to plot table values?
1 次查看(过去 30 天)
显示 更早的评论
hello i have a table with 2 columns.
1. numeric values (some wifi signal strength values)
2. Names (wifi hotspot names)
i want to plot name vs signal level
0 个评论
回答(2 个)
Walter Roberson
2017-8-11
s = YourTable.signal_strength;
n = YourTable.hotspot_names;
x = ones(length(s), 1);
y = s(:);
scatter(x, y);
text(x, y, n);
2 个评论
Walter Roberson
2017-8-11
x = 1 : length(s);
y = s(:);
scatter(x, y);
set(gca, 'XTick', x, 'XTickLabel', n);
Akira Agata
2017-8-11
How about using bar chart, like:
% Sample data
YourTable = table({'hotspot1';'hotspot2';'hotspot3'},[10;20;30],...
'VariableNames',{'Name','Value'});
bar(YourTable.Value);
ax = gca;
ax.XTickLabel = YourTable.Name;
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!