How to read a file unrecongnized to Matlab
    조회 수: 2 (최근 30일)
  
       이전 댓글 표시
    
hi, i am working on implementing the ECG on my DSP kit. i have stored the file using the provided software but its extension is ".ecg". Matlab of course does not read it directly...
If a open it in Matlab directory as OPEN AS TEXT, it opens. Then the data is shown to me as values from 8 channels of ECG. It has 8 numericals values in a spaced single row. And there are around 8000 rows with occasionally english text for heart rate and leads off status.
So is there a way i can read it?? Thanks.
댓글 수: 0
답변 (2개)
  Fangjun Jiang
      
      
 2011년 6월 10일
        You can use textscan() function to read it. Some other functions are textread(),dlmread(). Try it yourself first.
  Walter Roberson
      
      
 2011년 6월 11일
        If you have a mix of numbers and text and the text can appear at any line in the file, then you have to parse the data line by line. See for example the procedure in this Question
댓글 수: 8
  Walter Roberson
      
      
 2011년 6월 13일
				fgetl() to read the line, after which you could start another textscan()
참고 항목
카테고리
				Help Center 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
			
	제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


