Pointer Setting for identifying time of corresponding data

1 visualizzazione (ultimi 30 giorni)
I have a set of Data which has been optimised by Matlab. This Output Data is a matrix and after optimisation the decimal input values get converted into binary output values of 9 bits per value. Each set of 9 values in it corresponds to data for a set of time.
I need to now set a pointer to tell which set of 9 values belongs to which time step and onward based on its position. I'm quite puzzled on this issue, could anyone please advise me on how I could approach this issue?
For my data, 9 values represents 1 hour of data for 1 device and i have 105 hours of recording for 10 devices so 9450 (945x10) values in this matrix. Thanks!
  2 Commenti
AJ von Alt
AJ von Alt il 20 Gen 2014
Modificato: AJ von Alt il 20 Gen 2014
Can you clarify what the output of the "pointer" should be with an example? Do you have a vector of time stamps that you are trying to match with the data or do you want to generate your own time stamps?
Sam
Sam il 21 Gen 2014
Hi AJ.. i had just updated my question.. just realised that i forgot to add in something to my question.
For your clarification.. I have a matrix of time stamps i am trying to match to and i need every 9 values in this matrix to correspond to a respective time stamp. EG values 1-9 is for time 0000H of device 1, values 10-18 for 0000H of device 2, values 19-27 for 0000H of device 3 and onward.
This is why i am looking for a pointer to move to respective blocks of the data and capture the data.. Thanks!

Accedi per commentare.

Risposta accettata

AJ von Alt
AJ von Alt il 21 Gen 2014
Let's see if I have your situation right.
Your measurements are stored in a 9450x10 matrix where each row is a row corresponds to a measurement time and each column corresponds to a device.
Your time stamp is a 105 x 1 cell array where each element is a string containing the timestamp associated with 9 measurements made for each of the 10 devices during that hour. So each time stamp is associated with 90 different measurements.
You want a way of looking at something like measurement 12 on device 8 and figuring out that the time stamp is '0001H' .
In that case, you can associate each row of measurements with a time stamp by creating a 945x1 time stamp array. If your initial time stamp array is called baseTsArray, and you make 9 measurement per hour:
measurementsPerHour = 9;
expandedTsArray = reshape( repmat( baseTsArray , 1 , measurementsPerHour)' , [] , 1);
The new time stamp array would look like this:
expandedTsArray =
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0001H'
'0002H'
...
'0105H'
'0105H'
'0105H'
'0105H'
The time stamp associated with data(n,D) would be given by expandedTsArray{n} .

Più risposte (0)

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by