MATLAB: How to create a variable length string in MATLAB

strings

I want to create a string whose length and elements can be modified later i.e. I can change the elements of string and add new elements as I wish. How can I do that?

Best Answer

% Create String
MyStr = 'abcd';
% Change later
MyStr = 'lmnopqrst';