stateIDS = state2index(graph,states)
finds the state indices stateIDS for the queried state vectors
states, if they exist in the navGraph object
graph.
The navGraph states table contains a state corresponding to the first state data, so the function returns its index. However, the states table does not contain a state that corresponds to the second state, so the function returns 0.
State vectors, specified as a matrix in which each row represents a state vector.
The state vectors must be of the same size as those in the
StateVector column of the States table
in the navGraph object
graph.
State indices, returned as a column vector of positive integers. When the function
does not find a specified state vector, the value for the corresponding element in
stateIDS is 0.
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window.
Web browsers do not support MATLAB commands.
Seleziona un sito web
Seleziona un sito web per visualizzare contenuto tradotto dove disponibile e vedere eventi e offerte locali. In base alla tua area geografica, ti consigliamo di selezionare: .
Puoi anche selezionare un sito web dal seguente elenco:
Come ottenere le migliori prestazioni del sito
Per ottenere le migliori prestazioni del sito, seleziona il sito cinese (in cinese o in inglese). I siti MathWorks per gli altri paesi non sono ottimizzati per essere visitati dalla tua area geografica.