How to avoid displaying zero-values in confusion matrix

后端 未结 2 1230
情深已故
情深已故 2021-01-25 17:57

I plotted a confusion matrix in Matlab using the code from this link.

However whenever there is a zero on the cell it is still shown. How can I eliminate the printing of

2条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-01-25 18:17

    does this work - do a loop over i and j (spatial dimensions) after textStrings is defined and before it is converted to cell, and set

    textStrings(i,j,1:4)='    ';
    

    depending on if mat(i,j) is really close to 0.00 using an if-else statement

提交回复
热议问题