I want to extract the GCAMP signal from a data at a given times, for that I want to run the "for" loop with time intervals in text file.

조회 수: 2 (최근 30일)
I need to pick the data between the time interval.

답변 (1개)

Pranjal Kaura
Pranjal Kaura 2021년 9월 2일
Hey,
It is my understanding that you want to extract data out of a text fle using specified time intervals.
Case 1: You want to extract data at regular intervals
You can refer to this answer, to know more about the same.
Case2: You have read interval data from a text file.
Here's a code snippet to get the desired result
%dataset - your GCAMP signal dataset
%interval_Arr - array containg the intervals
for i = 2:length(interval_Arr)
start_interval = interval_Arr(i - 1);
end_interval = interval_Arr(i);
dataset(start_interval:end_interval) % required subset of dataset at every iteration
end
Case 3: You have date-time information in the text file and you want to extract data points using that.
You can refer to this answer, to know more about the same.

카테고리

Help CenterFile Exchange에서 Text Data Preparation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by