MATLAB: Error using str = input(prompt,’s’)

inputMATLABpromptuser

I need to ask user whether they have control data or not. if the answer was yes, I need to do other steps.
I tried this coammand:
prompt2='Do you have control? answer Yes/No ';
YesNo = input(prompt2,s);
if YesNo=='Yes'
end
and I got this error:
Undefined function or variable 's'.
What is wrong with this code?

Best Answer

YesNo = input(prompt2,'s')