Graphs in Matlab

This is a discussion on Graphs in Matlab within the Tech Board forums, part of the Community Boards category; Can anyone please throw some light on how to create graphs (GRAPH THEORY) in Matlab?...

  1. #1
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278

    Graphs in Matlab

    Can anyone please throw some light on how to create graphs (GRAPH THEORY) in Matlab?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Last time I did it, it was adjacency matrices all the way.

  3. #3
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    958
    like X-Y plots?

    x=0:0.01:5;
    y=sin(x);
    plot(x,y)

  4. #4
    Password:
    Join Date
    Dec 2009
    Location
    NC
    Posts
    587
    Epy, he's talking about graphs like those used in graph theory. What you are talking about are called graphs of a function. Unlike graphs on a function, which are for modeling trends and linear relations, graphs in graph theory are for showing relations between nodes or vertices. Discrete math is the closest relative of CS in math, you should consider studying it. I know you've heard of Dijkstra's shortest path finding algo, it's a solution to the problem of path finding in graph theory. You've probably also heard of four color theorem, it is from graph theory.

  5. #5
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    If I want to implement Adjacency Lists.
    How can I do so?

  6. #6
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,185
    Quote Originally Posted by anirban View Post
    If I want to implement Adjacency Lists.
    How can I do so?
    The best thing I can think of, on the assumption that Matlab lets you do it (which I don't know), is to do a vector of vectors. (I get the sneaking suspicion that, for Matlab, a "vector of vectors" is really a matrix.)

  7. #7
    Epy
    Epy is offline
    Fortran lover Epy's Avatar
    Join Date
    Sep 2009
    Location
    California, USA
    Posts
    958

  8. #8
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    Many thanks!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Convert Matlab Algebraic Sol to C compatible
    By Takeshi in forum C Programming
    Replies: 3
    Last Post: 01-08-2009, 05:35 PM
  2. MATLAB importing C libraries
    By chico1st in forum C Programming
    Replies: 1
    Last Post: 05-29-2008, 02:01 PM
  3. C/C++ and Matlab?
    By darkwalk in forum C++ Programming
    Replies: 2
    Last Post: 10-21-2006, 03:00 AM
  4. graphs and algorithms
    By Micko in forum C++ Programming
    Replies: 1
    Last Post: 04-26-2004, 01:13 PM
  5. Generate Graphs
    By beet in forum C Programming
    Replies: 6
    Last Post: 08-19-2003, 07:14 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21