Mar 25, 2008 #1 R rami823 Newbie level 3 Joined Mar 24, 2008 Messages 3 Helped 0 Reputation 0 Reaction score 0 Trophy points 1,281 Activity points 1,301 fid = fopen('alphabet.txt', 'r'); >> c = fread(fid, 5, 'uint8=>char')' ??? Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. hello all I am getting an error when running the code above, any clue?
fid = fopen('alphabet.txt', 'r'); >> c = fread(fid, 5, 'uint8=>char')' ??? Error using ==> fread Invalid file identifier. Use fopen to generate a valid file identifier. hello all I am getting an error when running the code above, any clue?
Mar 25, 2008 #2 P pngzhi Member level 3 Joined Jan 20, 2008 Messages 61 Helped 7 Reputation 14 Reaction score 1 Trophy points 1,288 Activity points 1,535 invalid file identifier -1 for matlab What is the fid value? Is it positivr or not? If it is positive you don't read the file truly.
invalid file identifier -1 for matlab What is the fid value? Is it positivr or not? If it is positive you don't read the file truly.
Mar 25, 2008 #3 FvM Super Moderator Staff member Joined Jan 22, 2008 Messages 52,394 Helped 14,748 Reputation 29,778 Reaction score 14,091 Trophy points 1,393 Location Bochum, Germany Activity points 297,975 Re: Weird MAtlab Error You probably tried to read a file not existing in working directory?