How to plot histogram with numerical and string data with Matlab?

10 ビュー (過去 30 日間)
Chandima PONDAPELAGE
Chandima PONDAPELAGE 2018 年 1 月 10 日
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 件)

カテゴリ

Help Center および File ExchangeHistograms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by