0

I have an EEG file stored in TDMS format, unfortunately the eeg device file converter wasn't working and I had to take the TDMS file, now I want to analyze it with Matlab eeglab, and it wont work since eeglab doesn't read TDMS file, i tried several apps and codes to convert the TDMS file to MAT file to work with it,

my last attempt was to work using convertTDMS function and im getting the following error :

Converting 'HM_B1_Filtered.tdms'...Arrays have incompatible sizes for this operation.

Error in simpleConvertTDMS>getData (line 1148)
nsamples=sum(id.nValues.*id.multiplier);

and this is the code im using :

s = simpleConvertTDMS(false, 'filename', fullfile(pwd, 'exampleFiles', 'HM_B1_Filtered.tdms'))

Thank you in advance for helping me getting through this.

the code works with it's example but not with any other data it seems, the solution is not revealed to anyone since I have not seen anyone in mathworks talking about any solution at all.

RichG
  • 9,063
  • 2
  • 18
  • 29
Tyrande
  • 15
  • 8
  • Can you test `simpleConvertTDMS` function with more TDMS samples (not acquired by your device)? I believe that you are not using a standard TDMS file format. – MJay Jul 24 '23 at 11:47
  • i tested the function with it's original sample and it works, well no error and a MAT file is in the output. does this mean the TDMS format is different ? should there be any difference at all ? – Tyrande Jul 24 '23 at 12:36
  • Yes, I think so, I have seen such differences in case of DICOM files. – MJay Jul 24 '23 at 12:54
  • So there is nothing i can do about it ? – Tyrande Jul 24 '23 at 12:57
  • If you read the file in binary format, you can recreate a standard TDMS file. I did so for corrupted (out of format) DICOM file many years ago. – MJay Jul 24 '23 at 12:59

0 Answers0