It is possible to use sprintf to print a string input?
Afficher commentaires plus anciens
Hi, I´m trying to print what the user inputs as a string, but it´s not working with this code below:
Thanks!!
clc, clear, close
vi=input('Indicate the name of the independent variable: ','s');
c1= sprintf('Indicate the units of the variable %0.0s',vi);
vi_u=input(c1);
3 commentaires
Vilém Frynta
le 15 Jan 2023
Modifié(e) : Vilém Frynta
le 15 Jan 2023
Are you doing this in Matlab Online, or do you have a directory or a script/function called "input"?
Madalena Francisco
le 15 Jan 2023
Madalena Francisco
le 15 Jan 2023
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Dates and Time dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!