Results 1 to 4 of 4

Math Help - Creating images in Matlab

  1. #1
    Senior Member Dinkydoe's Avatar
    Joined
    Dec 2009
    Posts
    411

    Creating images in Matlab

    Hee guys, I'm trying to make an image in matlab...

    I have a script, that creates from N (0,1)-uniform random numbers,

    a specific set of pairs {x_i,x_j}

    Now, I want these uniform numbers x_i to be vertices in a graph G
    and these pairs {x_i,x_j} to become edges in G.

    How can I create such images in matlab? So, given the set vertices...
    and given the set edges.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    Joined
    Oct 2007
    From
    London / Cambridge
    Posts
    591

    Re: Creating images in Matlab

    Use gplot
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Senior Member Dinkydoe's Avatar
    Joined
    Dec 2009
    Posts
    411

    Re: Creating images in Matlab

    Hoi, thanks.

    But the points x_i are all on the x-axis, and if there's an edge (x_t,x_s)...I want this edge to be like a semi-circle with a specific angle?

    Is that possible? Cause I could not find something specific like that in Matlab-plotting tools.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Oct 2007
    From
    London / Cambridge
    Posts
    591

    Re: Creating images in Matlab

    you can specify coordinates for the points in your graph.

    This should work:

    X = zeros(n,2);
    for i= 1:n
    D(i,1) = cos(i*2*pi/n) ;
    D(i,2) = sin(i*2*pi/n) ;
    end
    Followed by

    gplot(G,X,'-*')
    Where G is your adjacency matrix.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 1
    Last Post: July 13th 2010, 12:26 AM
  2. Creating rounded images
    Posted in the LaTeX Help Forum
    Replies: 1
    Last Post: June 26th 2010, 12:01 PM
  3. Matlab Help: Creating M-File
    Posted in the Math Software Forum
    Replies: 2
    Last Post: March 24th 2010, 09:12 PM
  4. Creating a loop in Matlab help
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 11th 2010, 04:06 AM
  5. MATLAB: dealing with images
    Posted in the Advanced Applied Math Forum
    Replies: 1
    Last Post: March 23rd 2008, 02:14 AM

Search Tags


/mathhelpforum @mathhelpforum