I find the default values work for me; but sometimes if I have a big signal with lots of missing values, limiting the length of the regression is helpful if all I want is a quick answer. Ideally the length would be just enough to cover the portion of the signal that has a constant AR model. If I'm missing a portion of a slowly varying oscillation, I use a larger value to cover a few cycles of it. If instead I'm missing just a portion of a decaying signal, then I keep the length to be within the decaying portion.
As for order, that can vary. I often start low at first, then increase. Most of the audio clips I tested tended to top out around an order of 200.
This example tries to explain what's going on under the hood. If you're looking at something that can just interpolate a couple of points that aren't oscillating much (if at all), then take a look at fillmissing. Let us know what you tried and share your data if you can.
4 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_384674
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_384674
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_384679
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_384679
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_384742
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_384742
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_385028
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/299148-how-to-optimize-the-parameters-in-fillgaps-function#comment_385028
Sign in to comment.