以相同比例放大两个信号

时间:2016-05-31 12:34:49

标签: matlab signals

我想要放大两个音频信号以收集信息并进行比较。我想要在-1和1之间定义它们而不改变它们的原始形状。

我已经尝试了这个Strengthening the low amplitude signal using Matlab WITHOUT changing the original shape of the signal,但它似乎并不适用于我的情况。

我的价值定义如下:

    <RelativeLayout android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <ImageView android:layout_width="wrap_content"
            android:layout_height="wrap_content" android:id="@+id/image_view" >
        <ImageView android:layout_width="wrap_content"
            android:layout_height="wrap_content" 
android:id="@+id/check_image" android:layout_centerInParent="true"
android:visibility="Invisible"/>
    </RelativeLayout>

这是我的信号:

enter image description here

有什么想法吗?

1 个答案:

答案 0 :(得分:2)

你正在寻找你的信号标准化,这意味着......将所有东西除以绝对最大值/最小值的最大值....

您的代码应该类似于:

 normalizey1 = y1./ (max(abs(max(y1)) ,abs(min(y1)) ));
 normalizey2 = y2./ (max(abs(max(y2)) ,abs(min(y2)) ));

有一种标准化信号的替代方案。它通过除以标准偏差 - 单位方差归一化 - 在比较信号时通常更有用。