Hi all, I can't seem to use fopen to open a file using a variable that stores the name and path of the file. For example, the variable [pathvariable] stores /imper/codec/data.txt. I am doing fid = fopen([pathvariable],'r') but it is not working.
I've tried the following too:
fid = fopen(pathvariable,'r')fid = fopen('pathvariable','r')
In all cases, I get a fid of -1.
Could someone please help. Thanks.
Best Answer