Timeseries events - how to extract y values for each event

2 次查看(过去 30 天)
Hello,
I have plotted a timeseries for some behavioural data and I would like to extract all of the scores (on the y axis) for the times in the events that I have entered. Please could someone help point me in the right direction
Thanks
  2 个评论
Adam Danz
Adam Danz 2021-3-18
I assume the red dots are the times you entered. If so, how did you plot them without using the (x,y) coordinates? I seems that you already have the y-data if you plotted the red dots and the red dots are the times you entered.
Rebecca Harding
Rebecca Harding 2021-3-19
i used the timeseries function, although I think that's overcomplicated things!

请先登录,再进行评论。

采纳的回答

David Hill
David Hill 2021-3-18
I am assuming you have two arrays, t and y, of the same length. To get the y values corresponding to an array of input times, T, then:
y_values=y(ismember(t,T));
  1 个评论
Rebecca Harding
Rebecca Harding 2021-3-19
So we have continuous time on the X axis, and z scores on the y axis (sampled every 1s). I need to find the corresponding z scores for a list of events that occur between the measured timepoints. This doesn't seem to be working

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Time Series Events 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by