Dimensions being inconsistent even though nothing has changed the output

6 ビュー (過去 30 日間)
Amritz Ansara
Amritz Ansara 2021 年 3 月 19 日
コメント済み: Amritz Ansara 2021 年 3 月 23 日
I have a model and I am trying to check what's wrong with the dimensions (since dimensions are not consistent).
I found this to be one of the (out of many) causes. The input into the gain is fine. The output is also fine. So why is the height a question mark?
  2 件のコメント
Amritz Ansara
Amritz Ansara 2021 年 3 月 22 日
Thanks both! A combination of that did help (and I had to explicitly specify which dimensions I wanted using the signal specification box).
Amritz Ansara
Amritz Ansara 2021 年 3 月 23 日
For posterity: the way I solved this issue was to track back through the model to find out which outputs and inputs are inconsistent. I would then specify what the dimensions are supposed to be using the signal specification blocks.
There were also some outport blocks which have a specified dimension they need to be in. Those were changed.
Everything works and my models run. I wish I could accept both answers as they both have been helpful and thus I've decided not to choose an answer.

サインインしてコメントする。

回答 (2 件)

Fangjun Jiang
Fangjun Jiang 2021 年 3 月 19 日
Double click the Outport block "Height" to check its properties. The question mark is referencing an issue there.
  4 件のコメント
Fangjun Jiang
Fangjun Jiang 2021 年 3 月 19 日
go layer up and check the dimension of the downstream connection. It is good you turned on the dimension display. You should be able to find the place where the two inconsistent dimensions meet.
Amritz Ansara
Amritz Ansara 2021 年 3 月 22 日
Another question: why is the xdotWheel to xdotAxle thing having inconsistent dimensions? It's a good thing I know the question marks aren't there anymore but... why is a 3x1 output being assigned to 6 input?
Here's what is inside the Wheel to Body transform block:

サインインしてコメントする。


Jonas
Jonas 2021 年 3 月 19 日
The [1x1] seems to suggest it is interpreted as a matrix (although with height and width of 1), and not as a scalar with dimension 1. May I suggest to try to add the 'Reshape' block before your Output block? This could reshape the matrix to a scalar again.
I wanted to test this for myself but couldn't manage to show the signal dimensions for some reason.
  1 件のコメント
Amritz Ansara
Amritz Ansara 2021 年 3 月 19 日
編集済み: Amritz Ansara 2021 年 3 月 19 日
The Component blocks are all grayed out since this was found deep within the Independent Suspensions-MacPherson block which is a block that MATLAB has made. So I can't add the Reshape block into there. Though, I've seen this happen a lot in the rest of my model outside that block so this could be useful.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeModel Verification についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by