How to create a for look that will allow me to iteratively add data to my cell array as I analyze each of my EDA files

조회 수: 1 (최근 30일)
I am working on analyzing EDA data that was originally saved as a .asq. I am able to run, one at a time, a funciton to get the SCR count, signal duration, frequency, and SCL. I want to have a cell array that will iteratively add my data or at the very least let me add data from the experimental and control conditions so I can caluclate change scores. I'm able to get one row in the array to work but that's about it. I am terrible at coding and have allot of trouble setting up functions but this seems like something I should be able to do within my code without saving a seperate function file. This is what I have so far and I'd love some help.
Here's what I've tried:
EDA_data=cell (40,6)
for n=1:6
EDA_data={filename, SCR_count, dur_sec, dur_min, freq, SCL_mean};
%save('EDA_data', 'filename', 'SCR_count', 'dur_sec', 'dur_min', 'freq', 'SCL_mean', '-append','-nocompression')
EDA_data=cell (40,6,1)
EDA_data(i+1,:,1)
Also a classmate figured out how to load and analayze all her data into a cell array, I don't think this is possible for EDA data that has been reconfirgured form an .acq since I am actualy converting a wave into data while she is converting data into a wave. In other words one of my .mat files has multiple data structures with various length data structures but if anyone does know how to do this that would be great but right now my biggest, stubborn issue is refusing to hand type my outputs, lol, although at this point that definitely would have been faster.

답변 (1개)

Asvin Kumar
Asvin Kumar 2021년 5월 10일
EDA_data=cell (40,6)
for n=1:40
% you can add a call to your function here to extract the six values
% used in the next line: filename, SCR_count, dur_sec, dur_min, freq,
% SCL_mean
EDA_data(n,:)={filename, SCR_count, dur_sec, dur_min, freq, SCL_mean};
%save('EDA_data', 'filename', 'SCR_count', 'dur_sec', 'dur_min', 'freq', 'SCL_mean', '-append','-nocompression')
end
This should help you assign those six outputs to each row of the EDA_data cell array. I assume each row corresponds to a different EDA data file and that the six values are extracted from your function call.

카테고리

Help CenterFile Exchange에서 Big Data Processing에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by