Remember, once you initialize a variable, it can never get any larger unless you coder.varsize() it.
Your code Double2String appears to work only for integers. For integers you can use int2str() -- it is supported for code generation. Unfortunately sprintf() is not supported for code generation and num2str is not supported for code generation.
cvklpstunc is correct that characters are not supported as signals (unless perhaps as some kind of custom signal), but you can transfer uint8 or uint16 around and char() them as needed.


