I got it it, heres the code:
playername = inputdlg('Welcome to The RPG, what is your name?:', ' RPG', 1);
charactername= char(playername(1));
msgbox(sprintf('Nice to meet you %s\n', charactername))
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!