# Creating images in Matlab

• Jun 17th 2011, 06:43 AM
Dinkydoe
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.
• Jun 18th 2011, 03:25 PM
bobak
Re: Creating images in Matlab
Use gplot
• Jun 20th 2011, 05:20 AM
Dinkydoe
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.
• Jun 25th 2011, 06:45 AM
bobak
Re: Creating images in Matlab
you can specify coordinates for the points in your graph.

This should work:

Quote:

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

Quote:

gplot(G,X,'-*')