I am using Matlab 2018b on Windows 10. I understand that the Matlab string concatenation needs input arguments under concatenation to be a character array, a cell array of character vectors, or a string array as mentioned in https://de.mathworks.com/help/matlab/ref/strcat.html. Based on this i was expecting an error while trying to do the following:
[1, 'some_string']
or
strcat(1, 'some_string')
But i am not getting any error message. Instead getting output as displayed in the snapshot below:
Based on below, looks like automatic type conversion is taking place for 1 from double to char but seems something in getting wrong in the process resulting in 1 being replaced with a junk char. Any insight in to this please?
x = strcat(1, 'some_string');
class(x(1))
ans =
'char'
