how can i type a letter in single quotes?

5 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)

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!