finding shift numbers to minimize the rms of four signals

2 次查看(过去 30 天)
Hi everyone,
I have four signals (1x10) which are right below;
A=[1 1 1 1 0 0 0 0 1 1];
B=[1 2 3 3 3 3 2 1 1 1];
C=[1 2 1 2 1 2 1 2 1 2];
D=[1 2 3 2 1 0 1 2 3 2];
and I want that:
  • result = (minimize[rms[A,B,C,D]). size of result should be 1x15. We can add zeros to A, B, C, D to reach 1x15 size.
  • To reach the best "result", all signals can be shifted and zeros can be added in x axes. I would like to determine the shifting parameter for each signal.
For example if I have the best result;
A must be shifted 3 digits by adding 3 zeros. and it will be new_A=[0 0 0 1 1 1 1 0 0 0 0 1 1 0 0], B will be new_B=[1 2 3 3 3 3 2 1 1 1 0 0 0 0 0]; C will be new_C=[0 0 0 0 0 1 2 1 2 1 2 1 2 1 2]; and new_D = [0 0 0 0 0 1 2 3 2 1 0 1 2 3 2 ].
So according to the upper result, I would like to determine four parameters that are A_t_shifted: 3, B_t_shifted= 0, C_t_shifted= 5, D_t_shifted= 5.
How can I determine these parameters to minize the result with a matlab code? (Maybe "corr" or "conv" can be helpful.)
kings regards
Cem
  1 个评论
Matt J
Matt J 2023-4-10
编辑:Matt J 2023-4-10
It's not clear why you think this combination of zeros minimizes rms. The rms should not depend on the location of additional zeros in the signals.
rms([1 2 3 0 0 0 ])
ans = 1.5275
rms([0 1 2 3 0 0])
ans = 1.5275
rms([0 0 1 2 3 0 ])
ans = 1.5275

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Signal Processing Toolbox 的更多信息

产品


版本

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by