I wrote a few lines of codes to open a file containing a list of words, but it doesn't seem to open any file when I choose the file from the dialogue box. Can anybody tell what did I do wrong somewhere? I dont think the 'return' code was the problem because when i set it into comment, the error still existed.
[FILENAME, pathname] = uigetfile('*.wsb', 'rt'); if (isequal(FILENAME,0) || isequal(pathname,0)) disp('User pressed cancel'); else disp(['User selected', fullfile(pathname, FILENAME)]); end fid = fopen(FILENAME,'rt'); if fid<0 %error could not find the file
return, end
Best Answer