MATLAB: How do you request an input inside disp

calling an input inside a dispdispinput

In the program i am developing the user is asked to give a name, through an input, to the file he wants to save. I want to make a disp at the end to show the user a message saying his file was saved just as he asked for in the input. Any help would be greatly appreciated.
Thanks in advance, Best Regards

Best Answer

João, you could use inputdlg
prompt = {'Input file name:'};
name = 'File name';
numlines = 1;
answer = inputdlg(prompt,name,numlines)