Retrieve Simulink model input dimensions using matlab
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Eduardo Garcia
am 18 Okt. 2022
Kommentiert: Eduardo Garcia
am 19 Jan. 2024
I am trying to use matlab to find an input signal block and get its allowed dimension. i am using the get_param function and thought using the compileddimension method would work, but the issue is that the input block at that state is just an input block, there are no associated dimensions of that block yet because the variable has not been created in the matlab workspace yet, but the model knows the allowed dimensions because it back propagates them from its downstream connections and i can see it in the line path of the model, yet the compileddimension method is blank. Can anyone help me on how to pull the allowed dimensions for a signal?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1161153/image.jpeg)
0 Kommentare
Akzeptierte Antwort
Fangjun Jiang
am 19 Okt. 2022
I think Simulink has a series of ways to determine the signal dimensions. Propagation takes higher priority than back propagation, or the priority is determined by settings in the block.
In your snapshot, the model has errors because workspace data has not been located yet. The model won't pass "model update" thus the compileddimension is invalid.
To get compileddimension, the model has to pass "model update".
To pass "model update", the data for the "From Workspace" blocks has to be located.
5 Kommentare
Paul
am 18 Jan. 2024
Hi Eduardo,
You may be interested in this thread and/or this thread (particularly the Answer from @Andy Bartlett)
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Functions finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!