Strcmpi and while loop in a script
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Day=strcmpi('monday', 'monday')=1
Day=strcmpi('monday', 'friday')=0
answer=input('favorite day?' , 's')
Thanks to any help
0 Commenti
Risposta accettata
Amit
il 19 Gen 2014
tf = 0;
comp_fav_day = 'monday'; %Lets say
while (tf == 0)
answer=input('favorite day?\n' , 's');
tf = strcmpi(comp_fav_day,answer);
end
5 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Loops and Conditional Statements 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!