Effacer les filtres
Effacer les filtres

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

1 vue (au cours des 30 derniers jours)
I want to call the variable "sigdata" in simulink using from workspace but I am receiving the following error message.
Error using horzcat
Dimensions of matrices being concatenated are not consistent.
time=[0:0.1:1001]';
y1 = wgn(1000,1,0);
time=[0:0.1:101]';
y1 = wgn(1011,1,0);
y2=y1';
sigdata=[time y2];

Réponse acceptée

Rik
Rik le 27 Nov 2017
time=[0:0.1:101]';
y1=wgn(size(time,2),size(time,1),0);
y2=y1';
sigdata=[time y2];
  1 commentaire
Rik
Rik le 27 Nov 2017
This will work just as well btw:
time=[0:0.1:101]';
y2=wgn(size(time,1),size(time,2),0);
sigdata=[time y2];

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Data Type Identification dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by