How can I use a floating point number with input command?
32 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Gavin Thompson
el 12 de Oct. de 2021
Comentada: Gavin Thompson
el 12 de Oct. de 2021
L = 10
a = input('Enter the location of the force (0 - %0.2f meters): ');
How can I get the prompt to output as 'Enter the location of the force (0 - 10.00 meters): '.
0 comentarios
Respuesta aceptada
Stephen23
el 12 de Oct. de 2021
L = 10;
S = sprintf('Enter the location of the force (0 - %0.2f meters): ',L);
a = input(S);
Más respuestas (0)
Ver también
Categorías
Más información sobre Characters and Strings 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!