Error using horzcat Dimensions of matrices being concatenated are not consistent.

2 vues (au cours des 30 derniers jours)
Yussif M. Awelisah
Yussif M. Awelisah le 16 Sep 2019
Commenté : Stephen23 le 9 Oct 2019
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
Error in tvf_emd (line 51)
y = [fliplr(y(2:2+num_padding-1)) y fliplr(y(end-num_padding:end-1))]; % padding to deal with boundary effect (symmetric)
I get this error whiles runing my code on a sample data of size 231x500. this codes works well on one sample of size 1x500.
Please any help to run the code on my full data. both data are attached. Please the full codes are also attached.
Please I sincerely needs your support urgently on this.
  2 commentaires

Connectez-vous pour commenter.

Réponses (3)

Matt J
Matt J le 16 Sep 2019
Modifié(e) : Matt J le 16 Sep 2019
I suspect it is because y is a column vector, whereas you intended it to be a row vector. You should run the code with "Pause on Errors" selected, so that the code will stop at line 51 where the error occurs. You can then inspect the shape of y and see what is going on.
untitled.png

Yussif M. Awelisah
Yussif M. Awelisah le 17 Sep 2019
yes the problem is with the dimensions but I have not been able to resolve it myself. I hope you can help.

Yussif M. Awelisah
Yussif M. Awelisah le 17 Sep 2019
I used the for loop to correct this problem but another problem occurs. The new problem is below.
Index exceeds matrix dimensions.
Error in tvf_emd (line 47)
y = [fliplr(y(2:2+num_padding-1)) y fliplr(y(end-num_padding:end-1))]; % padding to deal with boundary effect (symmetric).
The code and data are attached.

Catégories

En savoir plus sur Multidimensional Arrays dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by