how can i type a letter in single quotes?

2 views (last 30 days)
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

Accepted Answer

Walter Roberson
Walter Roberson on 5 Jun 2015
Include the \n in the format descriptor.
fprintf('''Q''\n')

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!