How do I use the values in a .txt file to create a stacked bar graph?
2 ビュー (過去 30 日間)
古いコメントを表示
I've already been successful at opening the file and obtaining the values
fileID = fopen('report_data.txt','r');
patientName=fgetl(fileID);
dateOfBirth=fgetl(fileID);
notes=fgetl(fileID);
healthy_exposed = fgetl(fileID);
pus = fgetl(fileID);
necrotic = fgetl(fileID);
ulcer_stage = fgetl(fileID);
area = fgetl(fileID);
volume = fgetl(fileID);
fclose(fileID);
But I'd like to take healthy_exposed, pus, and necrotic and create a stacked bar graph.
0 件のコメント
回答 (1 件)
Dishant Arora
2014 年 3 月 26 日
編集済み: Dishant Arora
2014 年 3 月 27 日
bar( [str2num(healthy_exposed)', str2num(pus)', str2num(necrotic)'], 'stacked')
4 件のコメント
Dishant Arora
2014 年 3 月 27 日
I was wrong on my part. I have made appropriate changes in the answer.
参考
カテゴリ
Help Center および File Exchange で Graphics Object Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!