Simulink Loads timeseries from mat file in the wrong dimensions?
2 ビュー (過去 30 日間)
古いコメントを表示
I am using the 'From File' block in my model in order to load several timeseries from a .mat file into a bus for further processing. I am receiving an error saying that a field in that structure indicates that the dimensions are [1000], however the element dimensions are set to [1000x1] by the bus object specified for that Parameter. However, when I use getdatasamplesize() on that Parameter I get ans = 1000 1 and the Data tab of the time series also states [1000x1] so it should actually fit as far as I can tell. Can someone explain to me whether I am loading this wrong or what I am missing here?
1 件のコメント
Don Zheng
2016 年 12 月 8 日
編集済み: Don Zheng
2016 年 12 月 8 日
Hi Karim,
Based on your description, I assume the MAT file stores a structure of timeseries objects and each field of the structure is a timeseries. Such conversion is supported by the ' Simulink.Bus.createObject ' command. The error you mentioned seems to be pointing to one of these timeseries objects whose dimension is not compatible. However, I am still not clear about the actual situation. If you can answer the following questions for me, that will help me or others in understanding the issue better to provide an answer.
1. Do you specify the Output data type field of the From File block as 'Bus: <object name>'?
2. The output of the From File block should be a signal. How is that related to the parameter (block parameter) that you mentioned?
3. Do you receive the error when specifying the File name field of the From File block, updating the model, or simulating the model?
4. Have you check which field of the structure stored in your MAT file is causing the error? Is its dimension consistent with the bus specification?
5. It will be helpful if you can attach the model and the MAT file for us to try.
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Sources についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!