edfwrite Modifies Data While Saving

5 ビュー (過去 30 日間)
Murat Mutlu
Murat Mutlu 2021 年 7 月 16 日
回答済み: Murat Mutlu 2021 年 7 月 19 日
Dear Members,
I am preprocessing EDF files (EEG recordings) for a project. I want to mask (make zero) some segments of the raw recordings before further processing them with EEGLAB. To that end, I decided to import raw recordings into MATLAB, mask the data, and then generate a new EDF file by using edfwrite function. Scripts worked smoothly, However, the results were wrong. So, I imported another EDF file, then back-generated a new EDF file with the same data and header information of the raw recording (retrieved by edfinfo). The results were different again.
It seems that edfwrite introduce a positive/negative offsets to the raw recordings as well as change in the amplitude range. The left image is the original data, while the right is the new edf file I created with the original data.
So, does anybody encounter with such a problem before?
Kind regards,
Murat

回答 (1 件)

Murat Mutlu
Murat Mutlu 2021 年 7 月 19 日
I have found the solution :)
It seems adding 'InputSampleType' option with "physical" solved the problem.
edfwrite("dataname.edf",header,data,'InputSampleType',"physical");

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by