Error in port widths or dimensions Error.

My input is a time history which is a 1x3001 double. How can I solve that error? Thanks.

2 件のコメント

Mathieu NOE
Mathieu NOE 2021 年 5 月 31 日
hello
you're using the wrong block for the input; here it's like you want to have all the 3001 values of the input vector feeding at every time stamp the system; this is not waht you want; you want to take one value per time stamp
look at the simulink demo files
Onat Aytac
Onat Aytac 2021 年 6 月 1 日
I couldn't figure out which block to use as input. I have tried to add timestep block between the input and the summation block but it did not work.

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

 採用された回答

Fangjun Jiang
Fangjun Jiang 2021 年 6 月 1 日

1 投票

If your t=sin(0:0.01:30), which is 1x3001 double, you need to make it a column vector and then use the "From Workspace" block.
You also need to specify the time steps for this data, for example, TimeStep=0:0.01:30.
Then specify the value of the "From Workspace" block as [TimeStep', t']

2 件のコメント

Onat Aytac
Onat Aytac 2021 年 6 月 4 日
Thanks!
wei bin
wei bin 2022 年 4 月 21 日
Hello, may I know you? I'm a student of Shenyang Architecture and Architecture University. My name is Wei bin. Today, I saw the answer to your question and solved the problem I've been wondering for several days. Can I know the you, my email weibin@stu.sjzu.edu.cn ; My wechat 18895374281;

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Functions についてさらに検索

製品

リリース

R2021a

質問済み:

2021 年 5 月 29 日

コメント済み:

2022 年 4 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by