How to display units with my answer?
73 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Holden Earl
el 22 de Mzo. de 2020
Comentada: Holden Earl
el 22 de Mzo. de 2020
prompt = 'Enter mass in pounds:';
x = input(prompt);
y = x*0.4536;
disp (y);
This is my current script and i want to have the answer display with 'kg' next to the answer and i cant figure out how to do it.
0 comentarios
Respuesta aceptada
Elysi Cochin
el 22 de Mzo. de 2020
Editada: Elysi Cochin
el 22 de Mzo. de 2020
fprintf('%g kg\n', y)
Más respuestas (0)
Ver también
Categorías
Más información sobre Introduction to Installation and Licensing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!