Concatinating Timestamps of A Data Stream
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!