MATLAB: Am i getting this error in the following line of code

inpudlg()

disp (' ');
name = input ('Enter a name for the folder (single quotes): '); % input folder's name
mkdir (name);
It was running fine when i tested it… 'Test' by giving this string name
disp (' ');
name = inputdlg ('Enter a name for the folder (single quotes): '); % input folder's name
mkdir (name);
now when i enter a string 'Test' as my folder name in this dialogue box i get error which says…
Error using mkdir
Argument must contain a string.

Best Answer

Rizwana, in this case use
name = inputdlg ('Enter a name for the folder (single quotes): ');
mkdir (name{1});
Note the curly brackets.