Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Create a function helps to find the path

1 回表示 (過去 30 日間)
Sushree Patra
Sushree Patra 2019 年 1 月 28 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
I want a create a recursive function for that I wrote one algorithm to calculate the path like
  1. function( int i , int j)
  2. if (i is rechable to out)
  3. root(i) = out;
  4. return i;
  5. else
  6. x = ((distance(i,j)<30)&&(max(distance(i,j)))&&(min(dist1(j)));
  7. root(i)= x(j);
  8. function(x,i+1);
  9. end
here i =13 nodes, j=50 nodes,out= destination
have to find out the least path
please somebody help me to solve it.
  1 件のコメント
Geoff Hayes
Geoff Hayes 2019 年 1 月 28 日
Sushree - what have you tried so far? How do you determine if i is reachable to out? SeeMATLAB function for details on how to define a function.

回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by