How can I use a floating point number with input command?
27 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Gavin Thompson
am 12 Okt. 2021
Kommentiert: Gavin Thompson
am 12 Okt. 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 Kommentare
Akzeptierte Antwort
Stephen23
am 12 Okt. 2021
L = 10;
S = sprintf('Enter the location of the force (0 - %0.2f meters): ',L);
a = input(S);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!