フィルターのクリア

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

1 回表示 (過去 30 日間)
Barkat
Barkat 2017 年 11 月 27 日
編集済み: Stephen23 2017 年 11 月 27 日
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];
  1 件のコメント
Rik
Rik 2017 年 11 月 27 日
This will work just as well btw:
time=[0:0.1:101]';
y2=wgn(size(time,1),size(time,2),0);
sigdata=[time y2];

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by