Using the load function with a user input?
Show older comments
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!
Answers (1)
Paulo Silva
on 7 Apr 2011
0 votes
load(strresponse)
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!