How to bold, italics sentence using fprintf in matlab?
Show older comments
How to bold , italics sentence using fprintf in matlab
Accepted Answer
More Answers (1)
Ryan Friedman
on 1 May 2019
30 votes
You can print bold only (not italics) using fprinf as shown below.
fprintf('Hello <strong> bold </strong> world.\n')
>> Hello bold world.
8 Comments
Adoniram
on 29 May 2020
Thanks!
fprintf(' <strong> Hello world.</strong> \n')
Alec Jacobson
on 28 Mar 2021
whoa! Where is this documented?
Nicholas Fugal
on 24 Aug 2021
Any why does it work on the command line but not a UI figure??
Walter Roberson
on 24 Aug 2021
However, for "traditional figures", only uicontrol style 'radio' and 'push' and 'dropbox' and 'listbox', and uitable supported HTML -- in particular not uicontrol style 'edit' or uicontrol 'text'
Aldo Mote Vigueras
on 30 Jan 2022
It worked very well. Thanks
Steven
on 24 Nov 2023
Works nicely in the MATLAB console window (R2023b)
Unfortunatly when using publish() to create a pdf or html document the same example apears as 'Hello <strong> bold </strong> world.' in the document.
Victoria Serrano
on 30 Jan 2024
I'm having the same issue when using publish() to create the PDF. Has anyone found the solution?
Categories
Find more on Call Python from 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!