I need help with programming a Depth First Search using Matlab.

Posted on 2006-04-20
Last Modified: 2016-02-10
I'm working on a sensor networking problem. I have a vector with the index of the nodes (in an n x n matrix) that should be connected. I also have an n x n matrix for the weighted edges between the connected nodes. First I would just like to see if a path exists between a root node and the end. Eventually, I will need to find the shortest path deterministically. Can anybody help with this problem? There was no subtopic area for Matlab programming.
Question by:markeyp
    1 Comment
    LVL 5

    Accepted Solution

    I suppose your problem is similar to finding the minimal path in a graph, so take a look at graph specific algorithms (connectivity and shortest path algorithms), see here for an example:

    You can google for more algorithms/details.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    trying to start a c# program 5 72
    countHi challenge 25 62
    word0 challenge 4 37
    wordappend challenge 8 51
    Navigation is an important part of web design from a usability perspective. But it is often a pain when it comes to a developer’s perspective. By navigation, it often means menuing. This is less theory and more practical of how to get a specific gro…
    How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
    This video teaches viewers about errors in exception handling.
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now