Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8368827
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T13:28:55+00:00 2026-06-09T13:28:55+00:00

I have a vector, stdclock, which holds values that follow this pattern: stdclock=[13 25

  • 0

I have a vector, stdclock, which holds values that follow this pattern:

stdclock=[13 25 38 50 63 75 88 100 113 125 138 150 163 175 188 200 213 2517 2529 2542 2554 2567 2579 2592 2604 2617 2629 2642 2654 2667 2679 2692 2704 2717]

This data is generated through an encoding of 17 values that come 12 or 13 numbers apart (e.g. 25-13=12, 38-25 = 13, etc). You’ll see that the first 17 values follow this pattern. Each group of 17 values encode an object, which we’ll call an ‘item’ and are independent of the subsequent 17 values. Then, between value 17 and 18, there’s a much larger difference than 12 or 13, but it could be any number higher than, say, 15. This difference represents a separation qualitative separation in the data such that the first 17 values encode one item, the next 17 values encode another item, etc etc. The difference between the 17th and 18th value will never be as small as 12 or 13. Therefore, I can check for any values >= 15, and be sure that I can separate my data in this way. Alternatively, I can reshape the vector as a 17xlength(stdclock)/17 matrix.

So far so good. The problem is that this vector is generated through hardware which can sometimes have errors such that one or more values is simply dropped and not recorded. I want to figure out an algorithm that will detect that values are missing from an ‘item’ and then remove all remaining values from that item.

I can’t quite wrap my head around how to do this in a way that will work for all patterns of errors (e.g. if an item can have missing numbers anywhere, in any pattern, and neighboring items may also have missing numbers anywhere in any pattern, or nowhere).

Any help would be appreciated. An example of a ‘corrupted’ item would be like this

stdclock=[13 25 38 50 63 75 88 100 113 125 138 150 163 175 188 200 213 2529 2542 2554 2567 2579 2592 2604 2642 2654 2679 2692 2704]

where this stdclock is the same as the one on top, but I went through in the second item and randomly removed numbers, including the first and last numbers.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T13:28:56+00:00Added an answer on June 9, 2026 at 1:28 pm

    If you can assume that the difference between consecutive groups is always larger than some threshold, you can use the approach below: identify consecutive groups, and throw out all groups of a length less than 17. It turns out that the threshold for a new group can be set as low as 15, since a missing data point will split a group of 17 into two shorter groups, which will then both be removed.

    stdclock=[13 25 38 50 63 75 88 100 113 125 138 150 163 175 188 200 213 2529 2542 2554 2567 2579 2592 2604 2642 2654 2679 2692 2704];
    
    %# a difference of more than groupDelta indicates a new (pseudo-)group
    groupDelta = 15; 
    groupJump = [1 diff(stdclock) > groupDelta];
    
    %# number the groups
    groupNumber = cumsum(groupJump);
    
    %# count, for each group, the numbers. 
    groupCounts = hist(groupNumber,1:groupNumber(end));
    
    %# if a group contains fewer than 17 entries, throw it out
    badGroup = find(groupCounts < 17);
    stdclock(ismember(groupNumber,badGroup)) = [];
    
    
    stdclock =
        13    25    38    50    63    75    88   100   113   125   138   150   163   175   188   200   213
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the vector d<-1:100 I want to sample k=3 times from this vector
Have a vector of vectors that looks something like this 3 1 2 0
I have Vector of elements that i set into BaseAdapter subclass and this adapter
I have a vector that I want to insert into a set . This
I have a vector which contains values such as: [-0.0081 -0.0060 -0.0020 -0.0014 -0.0002
I have a vector called time , which contains time values. I'd like obtain
I have this vector vector <string> data data = [this is, data that, is
I have a vector of objects (objects are term nodes that amongst other fields
I have the vector output = PV_out(:); I am trying to break this down
I have a vector of pairs representing hops between nodes which I would like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.