Concatinating Timestamps of A Data Stream

조회 수: 1 (최근 30일)
Midimistro
Midimistro 2016년 5월 31일
This question is basically the exact opposite of the question I posted earlier this month: Eliminating Certain Timestamps from an Array.
I have two arrays: "Time" and "Bytes", both of which correspond to one another (aka, are the same size and refer to the same type of data). I need to concatenate all of the data points in "Time" containing the same timestamps, but at the same time, add up the "Byte" values for that timestamp in order to create three new data sets: TimeConcat (where there are no duplicates) and ByteConcat (where the value of the Byte of the same timestamp are added up together) which is used to calculate/create TimeEnd, where the two time arrays will act as a "block of time" used in my combing algorithm(explained in another post).
The current data looks like this:
x = [.01, .01, .03, .04, .04, .04, .07, 1.0] %Timestamp
y = [096, 140, 096, 096, 140, 579, 579, 579] %Bytes
z = [.01, .02, .03, .04, .04, .06, .09, 1.2] %TimestampEnd (calculated using Bytes and a transmission speed)
And the results should look something like this:
xnew = [.01, .03, .04, .07, 1.0]
ynew = [256, 096, 815, 579, 579]
znew = [.03, .03, .07, .09, 1.2]
Let me know if you have any questions about the above givens.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by