필터 지우기
필터 지우기

Retrieve Simulink model input dimensions using matlab

조회 수: 5 (최근 30일)
Eduardo Garcia
Eduardo Garcia 2022년 10월 18일
댓글: Eduardo Garcia 2024년 1월 19일
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?

채택된 답변

Fangjun Jiang
Fangjun Jiang 2022년 10월 19일
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
Paul
Paul 2024년 1월 18일
Hi Eduardo,
You may be interested in this thread and/or this thread (particularly the Answer from @Andy Bartlett)
Eduardo Garcia
Eduardo Garcia 2024년 1월 19일
Thank you. I figured this out. Learning as i go.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by