MATLAB: How can i type a letter in single quotes

basicnext line

fprintf('''Q''')
>>> it gives 'Q' right but i want it the prompt in next line so i type
fprintf('''O''/n');
>>> 'O'/n>>
how to get prompt in next line

Best Answer

  • Include the \n in the format descriptor.
    fprintf('''Q''\n')