Confusion about Selector and difference between 'Dimension' & 'Column'

조회 수: 1 (최근 30일)
Hi guys, I am new to Matlab and not a native English speaker, so I met some problem with Selector block and the definition of Dimension. Could someone help me?
1. Definition I think the definition of 'Dimension' in matrix is the same with Column, am I right?
2.I am now studying the demo "Chroma based road tracking", and the Selector in Lane tracking is confused me.
The parameters is:
RowNo / Index option / Index / Outputsize
1 / Select all
2/ Starting index / 0 / 1
The input data is :
simout =
144.0000 21.7691
0.8727 2.0595
Based on my understanding of Selector, each row in parameter list is focus on the corresponding dimension of input data.
So for the first dimension, the result should be: [144;0.8727].
and the second dimension is : [21.7691]
The authentic result is : [144;0.8727], obviously there are some misunderstandings occurs. I hope someone could help me with this, thank you very much~

채택된 답변

Kaustubha Govind
Kaustubha Govind 2011년 4월 12일
In Simulink, a signal can have any number of dimensions: a 1-D signal is a vector, a 2-D signal is a matrix (eg. dimensions 3x4), you can also have 3-D (eg. dimensions 3x4x5) and 4-D (eg. dimensions 3x4x5x6) signals (and so on). So I guess you can think of the word "dimensions" as the number of co-ordinates needed to represent a sample point.
According to the block parameters, you select all numbers along the first dimension (which is rows) - this means you want to select all rows. We want to select only the 0 index from the second dimension (which means only the first column). So we want to select all rows from the first column.
If you are a MATLAB programmer, you can translate this to:
output = input(:,1)
(Note that since the block is in zero-indexing mode, the '0' index really corresponds to the index=1 in MATLAB).
  댓글 수: 2
Lofi
Lofi 2011년 4월 24일
THX for your answer, I think this is the same way as SQL query, right?
Kaustubha Govind
Kaustubha Govind 2011년 4월 24일
Sorry, I'm not familiar with SQL Queries.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Attributes and Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by