How do I get to boldface the numbers that I input?

8 visualizaciones (últimos 30 días)
Christella Bañaga
Christella Bañaga el 4 de Jun. de 2022
Comentada: Steven Lord el 7 de Jun. de 2022
Here is an intruction and a sample output to what it is supposed to look like.
  1 comentario
Steven Lord
Steven Lord el 7 de Jun. de 2022
Are you certain that your assignment requires you to display the user's answers in boldface, or did the instructor simply write the answers in boldface in the text of the assignment for emphasis?

Iniciar sesión para comentar.

Respuestas (2)

Sam Chak
Sam Chak el 4 de Jun. de 2022
You can use the TeX markup option for the bold font.
\bf text

Hans Scharler
Hans Scharler el 7 de Jun. de 2022
I know some fprintf tricks for text formatting, although it might not be elegant. You can use strong inside of fprintf.
outputNumber = randi(99);
fprintf('What is the meaning of life? <strong>%d</strong>', outputNumber)
What is the meaning of life? 21
Also, there is a File Exchange / Add-on called "cprintf" for customizing the output in the command window: https://www.mathworks.com/matlabcentral/fileexchange/24093-cprintf-display-formatted-colored-text-in-command-window

Categorías

Más información sobre Dates and Time en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by