Borrar filtros
Borrar filtros

So how do you make MAtlab into a responding program?

4 visualizaciones (últimos 30 días)
Rainaire Hansford
Rainaire Hansford el 15 de Sept. de 2013
Comentada: Rainaire Hansford el 30 de Sept. de 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?

Respuesta aceptada

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

Iniciar sesión para comentar.

Más respuestas (1)

Rainaire Hansford
Rainaire Hansford el 20 de Sept. de 2013
How do I make if and else statement equal to the words that I type.

Categorías

Más información sobre Startup and Shutdown en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by