how can i type a letter in single quotes?

1 次查看(过去 30 天)
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

采纳的回答

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

更多回答(0 个)

Community Treasure Hunt

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

Start Hunting!

Translated by