MATLAB: How to replace all the ones in a matrix with the string ‘hey’

ones

matrix= [1 0 0.1 0.001 4; 5.9 2.1 3.15 8.95 1.11]
All the ones should be replaced with 'hey'
This is my code
matrix= [1 0 0.1 0.001 4; 5.9 2.1 3.15 8.95 1.11];
matrix= num2str(matrix);
matrix(matrix=='1') = 'h'
when I replace 'h' with 'hey' it gives me this error
matrix(matrix=='1') = 'hey'
I have just started to learn MATLAB. please help

Best Answer

newmatrix = num2cell(matrix);
newmatrix(matrix == 1) = {'hey'};