How to plot histogram with numerical and string data with Matlab?
조회 수: 10 (최근 30일)
이전 댓글 표시
I have a csv file. It contains two column called Devices (String values) and AverageTime ( float, numeric value). I need to plot histogram, x axis: Devices, y axis: AverageTime. My code is
T=readtable('H:/Temporary/test.csv'); T.Properties.VariableNames = {'Devices' 'Time'}; Devices1=T.Devices; Time1=T.Time; hist(Devices1, Time1); But I'm getting error: Error using hist (line 48) Input arguments must be numeric. Error in test (line 5) hist(Devices1, Time1)
Please help me to plot this?
My csv file looks like: (just an example) Devices AverageTime A 10.23 B 22.38 C 78.20 D 100.002 E 57.1147
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!