I have been trying to find out how to load in a standard ascii file containing a simple matrix but the filename is entered by the user. Could anyone please show me how to do this in matlab script file?
At the moment I just use the line : load file.dat (ie extension of file is .dat)
in which the matrix 'file' is created in matlab. My script then works this matrix name 'file'.
Is there anyway which I can change the script to get the user to enter a filename instead of having it fixed in the script? Ie tried the : file = input('enter file name','s') load file