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!

Respuestas (1)

Preguntada:

el 7 de Abr. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by