[succIDS,costs] = successors(graph,currID)
finds the state indices succIDS and the cost of all states
costs that are connected to the specified state
currID using the directed link.
succIDS — Successive state indices column vector of positive integers
Successive state indices, returned as a column vector of positive integers.
Data Types: double
costs — Cost of all successive states numeric column vector
Cost of all successive states, returned as a numeric column vector of the same size
as succIDS. The function computes costs using the Weight or
LinkWeightFcn
property of the navGraph object
graph.
Data Types: double
Extended Capabilities
C/C++ Code Generation Generate C and C++ code using MATLAB® Coder™.
State names are not supported for code generation. Use state index to specify current
state as input.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.