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

  • SEARCH
  • Home
  • 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 6063921
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:13:21+00:00 2026-05-23T09:13:21+00:00

I have vectors of data that I feed through the filter() function — said

  • 0

I have vectors of data that I feed through the filter() function — said filter was constructed to emit a reasonable approximation of the original signal that is then used to identify “bad” elements in the original data (said elements are typically caused by infrequent short-duration sensor malfunctions and are quite distinct from good data). After identifying these bad elements, I want to go back and replace them with something reasonable.

One approach would be to replace the bad values with the filtered output; however, the output was generated with the bad values, so it has some amount of undesired distortion.

Ideally, I’d like a way to tell filter() to assume that the bad element[s] are missing and that it should instead generate a reasonable interpolation of the missing value[s] (e.g., based on the surrounding values and the properties of the filter) for use when constructing the output.

I’ve been told that certain toolboxes allow insertion of special values (e.g., NaN) to indicate missing (but assumed to be well-behaved) data.

I looked at the source code for Octave’s filter() and nothing obvious leapt out at me — is there a special value (or other mechanism) to tell filter() to assume that well-behaved data is missing (and should be inserted as needed)?

  • 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-05-23T09:13:21+00:00Added an answer on May 23, 2026 at 9:13 am

    Inserting NaN won’t work for this. The filter function is pretty simple–it simply implements an IIR filter.

    If your signal is smooth and slowly-changing, you might get away with simply using interp1 to interpolate new values for the bad stretches based on the good data on either side.

    If your signal has more complicated spectral content, I think “Wiener interpolation” is the phase to google for. For extrapolation you can use linear predictive coding.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some vectors of experimental data that I need to massage, for example:
I have a routine that generates a series of data vectors, one iteration at
I have several data that looks like this: Vector1_elements = T,C,A Vector2_elements = C,G,A
I have a function that performs a hierarchical clustering on a list of input
Let's say I have a tab-delimited text file that contains data arranged in columns
I have three vectors that look similar to these ones, in R and I
I'm trying to parse returned information that can have a variable amount of data
I have a two vectors of spatial data (each about 2000 elements in length).
I have some json data [{a:10, b:123,c:4.5},{a:2,b:5,c:33}] and so on that I read into
I have 2 extracted data sets from a dataset called babies2009( 3 vectors count,

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.