spectrum sensing via wavelet modulus maxima

1 vue (au cours des 30 derniers jours)
nur syafiqah
nur syafiqah le 21 Déc 2021
Réponse apportée : Akash le 22 Fév 2024
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);

Réponses (1)

Akash
Akash le 22 Fév 2024
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:-

Catégories

En savoir plus sur Continuous Wavelet Transforms dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by