bar not more working

3 ビュー (過去 30 日間)
Nik Rocky
Nik Rocky 2020 年 6 月 27 日
コメント済み: Nik Rocky 2020 年 6 月 27 日
Hello, I have
Classification_Values =
0
3001
4102
x =
1×3 categorical array
TP FN FP
and I get error:
291 Classification_Values = [TP_save; FN_save; FP_save];
Error using bar (line 216)
Data inputs must match the axis configuration. A numeric axis must have numeric data inputs or data inputs which can be converted to
double.
Error in Analysis_algorithm_26_06_20 (line 292)
b = bar(x, Classification_Values);
do you see something wrong? Thanks
disp('Bar plot')
tic
hold on
shortname = extractBefore(name, "_m");
title_help = ["Analysis_Bar:_Messsetup:_" + shortname + "_SNR:_",num2str(SNR_name)];
title_help = join(title_help);
title_help = strrep(title_help," ","");
title(title_help,'Interpreter','none');
x = categorical({'TP','FN','FP'});
x = reordercats(x,{'TP','FN','FP'});
Classification_Values = [TP_save; FN_save; FP_save];
b = bar(x, Classification_Values);
b.FaceColor = [0.6350 0.0780 0.1840];
%title("Result: " + mat_file_name,'Interpreter','none')
ylabel('Value')
toc
disp(['[' 8 cuts ']' 8]);

採用された回答

madhan ravi
madhan ravi 2020 年 6 月 27 日
Remove x from bar(...) and use it as xticklabels(...).
  1 件のコメント
Nik Rocky
Nik Rocky 2020 年 6 月 27 日
okay, thanks, but I found a problenm - it was hold on. It was wrong there.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by