How do I change the text output in Live Scripts?

45 views (last 30 days)
Rodney Smith
Rodney Smith on 24 Jan 2022
Commented: Rodney Smith alrededor de 19 horas ago
In a Live Script, I make some calculations and want to print out the result. I am using fprintf to do this. For example:
s='text output';
fprintf('Text value is %s',s);
The live script then prints out:
Text value is text output
How do I change the font, the font size, or the font style of the output?
I have tried to change font size in preferences, but none of the options change the font size of the live script output. If I zoom, it zooms everything (live script text as well as the output).
Thanks for any help you can offer
Rodney

Answers (1)

Ankit
Ankit on 24 Jan 2022
@Rodney Smith Please try following links to change the font, font size and font style.
for bold:
fprintf('Hello <strong> bold </strong> world.\n')
I use cprintf - display formatted colored text in Command Window - File Exchange - MATLAB Central (mathworks.com) for changing the font, style etc in MATLAB window. But I didn't tested this on Live Script.
  7 Comments
Rodney Smith
Rodney Smith alrededor de 19 horas ago
I was premature when I said it works in Live Scripts.
The only thing that seems to work in Live Scripts is the style 'Hyper' , which prints out in blue.
'*Hyper' and '*Text' both print bold.
Sorry

Sign in to comment.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by