from File and if block conditions error
1 回表示 (過去 30 日間)
古いコメントを表示
Hasan Atacan Tosun
2022 年 5 月 22 日
コメント済み: Walter Roberson
2022 年 5 月 28 日
Hello everyone,
I am building a Simulink structure for my homework which is about EVs.
I have Drive_cycle.mat contains time and corresponding speeds. It is directly connected (used goto, from blocks) to if block.
But I am getting an error. And I could not solve it.
I really appreciate any help you can provide. Thank you
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1007355/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1007360/image.jpeg)
2 件のコメント
Harshit Rastogi
2022 年 5 月 25 日
Hi Hasan, If possible could you please share the model and drive cycle data here. I think that you are giving the drive cycle as input to the 'if' block. As drive cycle has 2 columns , 'if' block is not able to know with whom to compare the given value. Also instead of goto and from block , first open the subsystem and try connecting the drive cycle directly to the if block.
採用された回答
Hasan Atacan Tosun
2022 年 5 月 28 日
1 件のコメント
Walter Roberson
2022 年 5 月 28 日
This does not explain the error about the port dimensions, or why 1369 instead of 1370.
Real problem is that your data must be 2 x 1370 instead of 1370 x 2
その他の回答 (1 件)
Walter Roberson
2022 年 5 月 27 日
Transpose your mat data. Timestamps are first row not first column.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Simulink Functions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!