Pointer Setting for identifying time of corresponding data
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
AJ von Alt
le 20 Jan 2014
Modifié(e) : AJ von Alt
le 20 Jan 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?
Réponse acceptée
AJ von Alt
le 21 Jan 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} .
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Logical dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!