Home > error fid1 > error fid1

Error Fid1

Support Support Newsreader MathWorks Search MathWorks.com MathWorks Newsreader Support MATLAB Newsgroup MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A New Message Advanced Search Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Post A New Message Advanced Search Help Trial software Matlab fid problem Subject: Matlab fid problem From: matthew.betti@gmail.... Date: 11 Jun, 2008 14:24:35 http://www.ibm.com/support/knowledgecenter/STQRQ9/com.ibm.storage.ts4500.doc/ts4500_opg_3584_fidmess.html Message: 1 of 7 Reply to this message Add author to My Watch List View original format Flag as spam Hello, I'm relatively new to Matlab. I'm attempting to import many files, apply a function to them, then export them to a different directory but I would like them to have the same filename https://www.mathworks.com/matlabcentral/newsreader/view_thread/170792 as the individual input files. I'm attempting to use textscan to import, but Matlab gives the files fid= -1 then tells me that the fid is invalid. The code I have written for this is as follows: files=dir(*.dat); for k=3:10 fname=files(k).name fid = fopen(fname,'r') C = textscan(fid, '%f %f %f %f %f %f %f %f %f %f %f','delimiter',',','headerlines', 8); is there something I am missing here that it returns a fid of -1? Also is there a similar process for exporting multiple files in the same fashion as they have been imported? Thanks for the help! Subject: Matlab fid problem From: Jos Jos (10584) (view profile) (Jos) 1494 posts Date: 11 Jun, 2008 14:40:18 Message: 2 of 7 Reply to this message Add author to My Watch List View original format Flag as spam matthew.betti@gmail.com wrote in message <413d9aa4-7b96-4b39-8ebf-1073ecf3e138@w7g2000hsa.googlegroups.com>... > Hello, > > I'm relatively new to Matlab. I'm attempting to import many files, > apply a function to th

Support Answers MathWorks Search MathWorks.com MathWorks Answers Support MATLAB Answers™ MATLAB Central Community Home MATLAB Answers File https://www.mathworks.com/matlabcentral/answers/116598-how-can-avoid-the-error-error-using-fclose-invalid-file-identifier-use-fopen-to-generate-a-valid Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help MATLAB Central Community Home MATLAB Answers File Exchange Cody Blogs Newsreader Link Exchange ThingSpeak Anniversary Home Ask Answer Browse More Contributors Recent Activity Flagged Content Flagged as Spam Help Trial error fid1 software Adrian (view profile) 8 questions 0 answers 0 accepted answers Reputation: 0 Vote0 How can avoid the error: Error using fclose Invalid file identifier. Use fopen to generate a valid file identifier. Error in open837 (line 4) fclose(fid); Asked by Adrian Adrian (view profile) 8 questions 0 answers 0 accepted answers Reputation: error fid1 0 on 18 Feb 2014 Latest activity Answered by Wayne King Wayne King (view profile) 0 questions 2,668 answers 1,084 accepted answers Reputation: 5,346 on 18 Feb 2014 23 views (last 30 days) 23 views (last 30 days) Hello. In order to read data from a binary file, I am trying to run the following code:function TMP = open837(filename)fid = fopen('18oct2013-121730.837', 'r'); fclose(fid); TMP.fileheader.ASCII8 = fread(fid,[1 1], 'uint8=>char'); TMP.fileheader.ASCII3 = fread(fid,[1 1], 'uint8=>char'); TMP.fileheader.ASCII7 = fread(fid,[1 1], 'uint8=>char'); TMP.fileheader.nToReadIndex = fread(fid, 1, 'uint8',0, 'ieee-be'); TMP.fileheader.TotalBytes = fread(fid,[1 1], 'uint16',0, 'ieee-be'); TMP.fileheader.nToRead = fread(fid,[1 1], 'uint16',0, 'ieee-be'); TMP.fileheader.Date = fread(fid,[1 12], 'uint8=>char'); TMP.fileheader.Time = fread(fid,[1 13], 'uint8=>char',0, 'ieee-be'); TMP.fileheader.VideoFrameLength = fread(fid,[1,1], 'uint32',0, 'ieee-be'); TMP.fileheader.XdcrUpDownDisplayMode = fread(fid,[1 1], 'uint8',0, 'ieee-be'); TMP.fileheader.StartGain = fread(fid, 1, 'uint8',0, 'ieee-be'); TMP.fileheader.ProfileTiltAngle = fread(fid,[1 1], 'uint16',0, 'ieee-be'); TMP.fileheader.Reserved1 = fread(fid, 1, 'uint8',0, 'ieee-be'); TMP.fileheader.Reserved2 = fread(fid, 1, 'uint8',0, 'ieee-be'); TMP.fileheader.NumberofPingsAveraged = fread(fid, 1, 'uint8',0, 'ieee-be'); TMP.fileheader.PulseLength = fread(fid, 1, 'uint8',0, 'ieee-be'); TMP.file

 

Related content

No related pages.