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!