MATLAB: ‘\n’ is not working in set_param(‘Inport1’, ‘Description’, strcat(‘A’,’\n’,’B’))

command lineinportinport descriptionMATLABset_paramsimulink

Hie,
Could anyone answer, why \n is not working in set_param? e.g. set_param('Inport1', 'Description', strcat('A','\n','B'));
Thank you, Sitha Ram

Best Answer

strcat always Outputs 'A\nB' instead of 'A<NEW_LINE>B' for the command 'A\nB'.
The answer for this question is: set_param('Inport1', 'Description', "A"+char(13)+"B");
Sitha Ram