I have a cell array 25 x 2 that contains names and codes, called 'names'. The codes are numeric. I have another cell 40 x 4 called 'data'.
One column in the cell 'data' contains a numeric code that can be linked to the other 'names' cell. What I was trying to do is replace the numeric codes in 'data' with the corresponding name from the 'names' cell.
I was looking at converting the numeric code field to a string, line below. Then use the strrep function I believe I would have to create a loop to replace all the strings. Is there a better way of doing this task? Is a loop required?
num2str(cell2mat(data(:,1)));