Effacer les filtres
Effacer les filtres

So how do you make MAtlab into a responding program?

4 vues (au cours des 30 derniers jours)
Rainaire Hansford
Rainaire Hansford le 15 Sep 2013
I Want to make a program that can respond back to you with words. I found one way but its annoying. I need to put (' ') Around the words I type and the it response but I just want to type the words and it give off a correct responses. Any good examples to make this work?

Réponse acceptée

Walter Roberson
Walter Roberson le 15 Sep 2013
Use input with the 's' option to request the responses
din = input('What did you have for dinner?', 's');
  7 commentaires
Walter Roberson
Walter Roberson le 30 Sep 2013
if any(strcmpi(din, {'Hello', 'Hi', 'Whats up'}))
Rainaire Hansford
Rainaire Hansford le 30 Sep 2013
Awesome Thanks alot

Connectez-vous pour commenter.

Plus de réponses (1)

Rainaire Hansford
Rainaire Hansford le 20 Sep 2013
How do I make if and else statement equal to the words that I type.

Catégories

En savoir plus sur Startup and Shutdown dans Help Center et File Exchange

Produits

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by