How can I use a floating point number with input command?
31 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Gavin Thompson
il 12 Ott 2021
Commentato: Gavin Thompson
il 12 Ott 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 Commenti
Risposta accettata
Stephen23
il 12 Ott 2021
L = 10;
S = sprintf('Enter the location of the force (0 - %0.2f meters): ',L);
a = input(S);
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!