Using the load function with a user input?

Hi all,
Have been googling this for a while and can't seem to find any previous posts that can help! I am writing an m-file to read in a file name from user input and then load this... This is what I have done so far, I just don't know how to load the value for strresponse as a file name.
prompt=' Input ctd file name in format: ctdnnn '; %reads in name by user on command screen
strresponse=input(prompt,'s')
strresponse = strtok(strresponse)
load strresponse %<<<<< here is where I am stuck
I am probably doing something silly but I can't see what! Any help would be greatly appreciated!

类别

帮助中心File Exchange 中查找有关 Variables 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by