Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Create a function helps to find the path
조회 수: 1 (최근 30일)
이전 댓글 표시
I want a create a recursive function for that I wrote one algorithm to calculate the path like
- function( int i , int j)
- if (i is rechable to out)
- root(i) = out;
- return i;
- else
- x = ((distance(i,j)<30)&&(max(distance(i,j)))&&(min(dist1(j)));
- root(i)= x(j);
- function(x,i+1);
- 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
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!