Pointer Setting for identifying time of corresponding data

조회 수: 1 (최근 30일)
Sam
Sam 2014년 1월 20일
답변: AJ von Alt 2014년 1월 21일
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
AJ von Alt
AJ von Alt 2014년 1월 20일
편집: AJ von Alt 2014년 1월 20일
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 2014년 1월 21일
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!

댓글을 달려면 로그인하십시오.

채택된 답변

AJ von Alt
AJ von Alt 2014년 1월 21일
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개)

카테고리

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