Filter löschen
Filter löschen

Simulink Loads timeseries from mat file in the wrong dimensions?

2 Ansichten (letzte 30 Tage)
Jan Sailer
Jan Sailer am 1 Dez. 2016
Bearbeitet: Don Zheng am 8 Dez. 2016
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 Kommentar
Don Zheng
Don Zheng am 8 Dez. 2016
Bearbeitet: Don Zheng am 8 Dez. 2016
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: &ltobject name&gt'?
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by