confusion matrix with string greek letters like alpha and beta

6 views (last 30 days)
I have a string matrix with is supposed to have greek letters.
Example: My matrix contains the abbreviation: B-Glc, but I want it to appear as β-Glc in the matrix and on the axis of the confusion matrix.
I have tried '/beta' but it did not work.
Thnak you

Sign in to comment.

Answers (2)

Rik on 16 Sep 2022
If you use the actual greek letters, that should work (as long as the function supports all implemented characters):
axis([0 5 0 2])
  1 Comment
Walter Roberson
Walter Roberson on 17 Sep 2022
Unfortunately, confusionchart does not have any control over interpreter. However if you insert unicode characters into the class labels, the characters will be drawn (if present in the font.)

Sign in to comment.

LuMig on 19 Sep 2022
I solved this issue (only a turnaround)
% alpha is the greek letter
alpha = cellstr(char(945));
% Label1 is the true label and I am appending an optional string to alpha.
% Label(1,1) will contain /alpha-Glu in greek
Label1(1,1)= strcat(string(alpha), '-GLu');
Label2(1,1)=strcat(string(alpha), '-MM');
% Apply confusionchart to Label1 and Label2
the class labels on the axes as greek letters rather than normal letters
LuMig on 20 Sep 2022
You are right, no need to cellstr() and string(). Thank you

Sign in to comment.


Find more on Labels and Annotations in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by