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

1 次查看(过去 30 天)
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];

采纳的回答

Rik
Rik 2017-11-27
time=[0:0.1:101]';
y1=wgn(size(time,2),size(time,1),0);
y2=y1';
sigdata=[time y2];

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Identification 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by