| 	
		 From: Samiran on 9 Mar 2010 14:18 Hi, Below is the code I am trying out: path='/home/sdam/netlist'; fid=fopen(path,'r'); fgets(fid); But I got the error saying: ??? Error using ==> fgets Invalid file identifier. Use fopen to generate a valid file identifier. I didn't understand why this error came up even though I used fopen to generate the file identifier - fid. Please help! Regards Sam 	
		 From: Walter Roberson on 10 Mar 2010 00:22 Samiran wrote: > Hi, > > Below is the code I am trying out: > > path='/home/sdam/netlist'; > fid=fopen(path,'r'); > fgets(fid); > > But I got the error saying: > > ??? Error using ==> fgets > Invalid file identifier. Use fopen to generate a valid file identifier. > > I didn't understand why this error came up even though I used fopen to generate the file identifier - fid. You failed to check that fid was not -1, indicating an error in opening the file. Double check that that path exists and is not a directory. 	
		 From: Samiran on 9 Mar 2010 14:31 Yes you are right. The path was not properly set. I should have been more careful in checking the error before I posted the problem. Thanks again... Regards Sam 
		  | 
 Pages: 1 Prev: summation calculation in MATLAB Next: help converting laplace to time domain |