spectrum sensing via wavelet modulus maxima

3 ビュー (過去 30 日間)
nur syafiqah
nur syafiqah 2021 年 12 月 21 日
回答済み: Akash 2024 年 2 月 22 日
i have coding to get spectrum sensing via wavelet modulus maxima. but i have problem where the error : Arrays have incompatible sizes for this operation. after i add first_order
j = [1 2 3 4];
s = 2.^j;
cwt = conv2 (y_amp_transpose, teta_f_transpose);
d1 = diff(cwt,1);
first_order = s.*(d1);

回答 (1 件)

Akash 2024 年 2 月 22 日
Hi Nur,
This error typically occurs when there is a size mismatch between the arrays you are trying to perform element-wise multiplication on. In MATLAB, the operation 'A.*B' requires that 'A' and 'B' have the same size, or are compatible in size.
To resolve this issue, you should first check the sizes of 's' and 'd1' using the 'size' function. Compatible sizes mean that for each corresponding dimension, the size of that dimension should either be the same for both arrays or one of them should be 1.
After checking the sizes, if the dimensions of 's' and 'd1' do not match, you may need to transpose 's' to ensure compatibility between the sizes. For more detailed information on compatible array sizes, you can refer to the MATLAB documentation provided in the link below:-


Help Center および File ExchangeContinuous Wavelet Transforms についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by