how to save multidimensional structures into .mat file

Hello, In my workspace I have a variable A (1x1 struct) with 42 fields. A contains several information about EEG data. I need to save two of its fields into one .mat file. The fields I need to save are:
1) A.data (66x4360x55single), where 66 are the electrodes, 4360 are data points and 55 are the number of epochs.
2) A.event (1x330 struct). Where 330 refers to the 55 epochs multiplied by 6 different types of events for each epoch.
The ideal solution would be to associate the info of A.event to the 55 epochs, when saving the file.
Do you have any suggestions on how to do it?
Many thanks!

 Accepted Answer

B.data = A.data;
B.event = A.event;
save('data.mat', 'B');

More Answers (0)

Categories

Asked:

on 23 Sep 2015

Edited:

on 23 Sep 2015

Community Treasure Hunt

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

Start Hunting!