Signal types for dimension 8 vs [8 x 1] - what's the difference?

8 ビュー (過去 30 日間)
Michael
Michael 2021 年 9 月 17 日
I appologize for such a simple questions, but I am in the process of learning Simulink. I am using the 'Information Overlay' to see the signal dimensions of a Simulink model I am working on. I have two signals that hold the same 8 values. One of them comes from a vector concatenate block with 'Vector' mode turned on. The signal dimension info overlay says '8' for this signal. I have another block (UDP Receive) whose signal dimesion is [8x1]. Can someone clarify what the difference is?
If I used the demux block on the [8x1] signal and then use the vector concatenate block, I get a signal with dimension 8 as I need, but this seems more complicated that it should be.

採用された回答

Harikrishnan Balachandran Nair
Harikrishnan Balachandran Nair 2021 年 9 月 20 日
編集済み: Harikrishnan Balachandran Nair 2021 年 9 月 20 日
Hi,
From my understanding, you want to convert a signal of dimension [8 *1] to a 1D vector having 8 elements. The former is a multidimensional array ( Column Vector) while the latter is a 1D array. You can convert a column vector to a 1D array using the 'reshape' block in simulink , by setting the 'Output dimensionality' in the parameters section of the block as '1-D array' .
  2 件のコメント
Michael
Michael 2021 年 9 月 20 日
This is exactly what I was looking for. Coming from a Matlab background, the distinction between a 1-D array and multidimensional arrays was not clear to me. For future reference, could you post any Simulink documentation pages that clarify these datatypes? I wan't able to find any documetion that clears this up. As a general comment, it would be nice for Mathworks to provide an onramp for Simulink for Matlab users that spells out clearly how things are similar and how things are different between the two software. I'd love that training.
Thanks!
Harikrishnan Balachandran Nair
Harikrishnan Balachandran Nair 2021 年 9 月 21 日
Hi,
You can refer to the following documentations to get a better idea on signals and signal dimensions in simulink.
Also , you can get started with simulink by taking up the simulink onramp course using the following link : https://www.mathworks.com/learn/tutorials/simulink-onramp.html
Hope this helps!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by