Error using input functions

if true
% code
endI AM DOING SPEAKER RECOGNITION MATLAB CODE I AM GETTING ERROR AS
Error using input
Error in main (line 25)
Undefined function or variable 'k'.
name=input('Enter your name:');
WHEN I ENTERED A NAME THE ERROR IS AS ABOVE PLEASE HELP

 Accepted Answer

See if this works for you:
name=input('Enter your name:','s');
From the documentation for input:
  • str = input(prompt,'s') returns the entered text as a string, without evaluating the input as an expression.

More Answers (0)

Categories

Find more on Text Analytics Toolbox in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!