how to read eeg signal by column from excel file(matrix)?
3 views (last 30 days)
Show older comments
%reading signals by column from file/14 channel
sig=importdata('file.xlsx');
P4=sig(:,1);
O2=sig(:,2);
P8=sig(:,3)
........
3 Comments
Answers (1)
Walter Roberson
on 13 Feb 2023
Edited: Walter Roberson
on 13 Feb 2023
sig = readtable('file.xlsx');
P4 = sig{:,1};
O2 = sig{:,2};
P8 = sig{:,3};
There is a more compact but harder to understand version for the case that all columns of the table are numeric and you are assigning them all:
sigcell = num2cell(readmatrix('file.xlsx'), 1);
[P4, O2, P8, Q3, N7, R2D2, C3P0, OB1, Number5, Fifth, V, Number6, Agent99, Experiment626 ] = deal(sigcell{:});
Your R2019a version is the first version that supported readmatrix(); older versions would need
sigcell = num2cell(table2array(readtable('file.xlsx')), 1);
0 Comments
See Also
Categories
Find more on EEG/MEG/ECoG in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!