English 中文(简体)
MATLAB中两个不同长度数据集的重采样
原标题:Resampling of two data sets of different length in MATLAB

我有两个矢量:长度为927的传感器A和长度为1250的传感器B。我想做同样长度的。MATLAB中的重采样()函数在边缘非常嘈杂,我需要至少相当好的精度。

我知道重采样可以通过插值来完成,但我如何以最有效的方式实现它。我需要尽可能均匀地拉伸927到1250。

我想知道我是否可以这样做:

  1. I need 333 new samples in the shorter vector. So for every 3 values, I insert the average (midpoint) of two consecutive values in between then. => 309 samples inserted
  2. For the remaining I insert again for every 38 samples (927/(333-309))

这有道理吗?我仍然无法得到精确的插值。我还可以使用其他功能吗?(除了interp(),因为它需要积分重采样率?)

最佳回答

从信号处理的角度来看,不应该只是每3个值插入一个样本。这将是不均匀的拉伸,会破坏你的信号。重采样函数就是您想要的。请尝试更改n和/或beta的参数。您可能需要按照此处以减少边缘效应。

问题回答

对带限信号进行重新采样与使用无限Sinc插值内核的插值相同,并且非常接近于使用精心选择的窗口的窗口Sinc插值。请参阅斯坦福大学CCRMA网站了解详细信息。

要进行插值,请使用interp1。就您的目的而言,这可能已经足够好了,尽管如上所述,重新采样是正确的做法。





相关问题
Least squares optimal scaling

I have two waveforms which are linked by a numerical factor. I need to use optimal scaling (least squares) between the two waveforms to calculate this factor in Matlab. Unfortunately I have no idea ...

How to Get a Quantitative Comparison of Two Signals

I’m trying to implement a Blind Source Separation (BSS) algorithm and I’m running into trouble determining the efficacy of the algorithm. I’m trying to create test cases where I work backwards and ...

数字过滤器设计

采用什么最佳方法选择马特拉布数字过滤器设计特性与全球数据分析仪的过滤器? 更具体地说,如果我有信号,我如何确定哪些过滤价值......。

DSP Algorithms Book [closed]

I m looking for a book similar to "Introduction to Algorithms" by Thomas Cormen geared towards DSP algorithms. Is there anything as thorough as Cormen on the DSP market? EDIT I should say I m ...

Digital Sound Processing in C# (and possibly SilverLight)

I need to do some basic and non basic DSP programming in C#. At its core, it includes the generation of a sin wave deciding its frequency in Hertz. Then I d like to Frequency Modulate it and maybe ...

Basic DSP - level adjustment

I m new to DSP programming, and I m wondering how best to carry out the seemingly basic operation of level adujustment. Say I have an 8 bit number that represents the amplitude I want a signal to be ...

Entertaining a baby with VB.NET

I would like to write a little application in VB.NET that will detect a baby s cry. How would I get started with such an application?

热门标签