mathlab code(help!)

Discussion in 'Programmer's Corner' started by saghar19, Jan 10, 2013.

  1. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    Hi
    I have an EEG data with LED format and i want to open it with matlab and then analyze with FFT.I don't know how!?:confused:
    please help me. I need your emergency help!
    thanks
     
    Last edited: Jan 10, 2013
  2. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    I think i should more explain,
    I have recorded two EEG channels at the same time and i want to open the EEG data with matlab and then calculate fft of each channel separately(to compare them).
    String precision is int16 and data format is LED.
    How can i do that????
     
  3. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    No one can help you if we do not know what is LED format.
     
  4. tshuck

    Well-Known Member

    Oct 18, 2012
    3,531
    675
  5. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    When i recorded eeg, i found that these file formats were produced(PDT and LED and VAL)
    I'm confused of these formats too!
     
  6. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    How did you record the data? Have you looked for documentation associated with the equipment that produced the recording?

    Also, when you say "these file formats were produced", do you actually mean that you know that those are the designations for the file formats, or just that those are the extensions of three files that were written?
     
  7. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    Thank you friends
    After trying some codes,finally I found the way to open and analyze this file format.:)
     
  8. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    Would you mind providing a bit of information about what you did. It might help other people in the future.
     
  9. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    It's not hard:

    A=fopen('file name.LED','r');
    eeg=fread(A,precision)
    Now you have an array that is containing ur data samples,and now u can do other analysis that u want.
    Just it
    Nothing new!;)
     
  10. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    You did not say what is precision and what does LED stand for.
     
  11. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    As i said in #1,#2 posts,LED is the format of my eeg data.
    Precision "contains a data type specifier such as int or float,followed by an integer giving the size in bits".It depends on ur particular eeg machine.
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    You did not answer the question.
    What was YOUR precision?
    What was YOUR LED format?
    What does LED mean?
     
  13. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    Why do you think that saying that the file is LED format is going to mean anything to anyone here? The fact that MatLab was able to open it probably means that it is an ASCII file, but that doesn't say anything about how the contents are formatted.

    I tried to do a quick search and found several EEG formats, such as the ones described here:

    http://paulbourke.net/dataformats/eeg/

    But I couldn't find any LED format description. For all we know, it's Larry's EEG Data format.

    Now, this appears to be a mute point because you've apparently gotten things to work, although it seems like it would have been hard to work with the data in the file without knowing how it is organized (unless you are using someone else's MatLab routines to analyze the data, which is fine and dandy if that's the case).
     
  14. saghar19

    Thread Starter Member

    Jul 16, 2012
    38
    0
    Oops!
    There was a big misunderstand!:D
    Now i understand your meaning.
    This file contains 24 EEG channel samples with string presicion of int16(2 bytes for each channel as i know)
    Was it your question? or there are other unclear points???:rolleyes:
     
  15. MrChips

    Moderator

    Oct 2, 2009
    12,415
    3,354
    My question is, what does the file extension LED mean?
    For example,

    .doc = document
    .lst = list
    .txt = text
    .bin = binary
    .dll = dynamically linked library
    .fig = figure
    .m = meta
     
  16. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    Getting close. I have a pretty good idea of what the format probably is, but there are some ambiguities still. Tell you what, if you could post a few lines from the file, say enough to have at least four samples from each channel, then I will write a description of what I think the format is. From that, you will see the kinds of things that it takes to properly describe a file format.
     
  17. WBahn

    Moderator

    Mar 31, 2012
    17,715
    4,788
    I think it's an ad hoc and/or proprietary file extension.
     
Loading...