MATLAB: Error using input functions

functioninputspeakerundefined

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

Best 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.