How do I save changes to an edf file that was generated from EyeLink?

16 ビュー (過去 30 日間)
Monique Chatterton
Monique Chatterton 2021 年 8 月 26 日
回答済み: Gargi Patil 2021 年 8 月 30 日
How do I save an edf file that was generated from EyeLink (that I have made a minor modification to) as an edf file? I have an edf file generated from EyeLink. I made one change to one of the values in a field, and want to save the edf file with this one change intact and want everything else about the structure of the file to remain the same. However, I can't find a way to save the file as an edf file with everything in place. I can save it as a .mat file but have not been able to save it as an edf file. Thank you for your help
Trials= edfImport('C:\Users\Lab\Desktop\M\Experiment\Unprocessed Subject Data\025\025_ED.edf', [1 1 1], '');
for i=1:104
if find(~any(~isnan(Trials(i).Samples.pa(2,:))))==1 %this tells you to find rows that have all NaNs
Trials(i).Samples.pa(2,:) = NaN; %fills the B column tally with NaN
else
Trials(i).Samples.pa(2,:)= 256*sqrt(((Trials(i).Samples.pa(2,:))/3.14159))
end
end
save('025_ED_C','-struct','Trials')%this does not work. it saves it as a .mat file and I would like it to be saved as an edf file

回答 (1 件)

Gargi Patil
Gargi Patil 2021 年 8 月 30 日
Hi,
The save command by default saves a given file as a MAT-file. MathWorks provides support to work with EDF/EDF+ Files through various functions. These are listed on the following documentation page under the "Functions" category "Datastores and Data Import": https://in.mathworks.com/help/signal/machine-learning-and-deep-learning-for-signals.html
The EDF file can be directly modified using the command edfwrite.
You can also refer to the linked file exchange which contains the function "SaveEDF" to save a file as an EDF File.

カテゴリ

Help Center および File ExchangeAI for Signals についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by