how to generate a mesh ? maximum edge length should be 40 and number of nodes should be 126.

 채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 4일

0 개 추천

[X,Y] = ndgrid(1:6, 1:21);
Z = rand(size(X));
mesh(X, Y, Z);

추가 답변 (1개)

Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2014년 2월 4일

0 개 추천

http://tinypic.com/r/erx0lt/8..... how to create a network like that.. is that a polyogn or mesh

댓글 수: 4

Walter Roberson
Walter Roberson 2014년 2월 4일
If you are asking how to draw that, then patch() turns out to be the easiest way, because of the color changes.
If you are wanting to simulate 126 random nodes and use an algorithm to find a Hamiltonian Cycle through the nodes, then the methods depend upon whether you are allowed to have a "global view" and can "impose" the path from outside, or if you are instead requiring that the nodes distributedly work out the path, especially if the connections between the nodes varies dynamically.
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2014년 2월 4일
yes. i need to simulate 126 random nodes and to find a hamiltonian cycle through the nodes.
Walter Roberson
Walter Roberson 2014년 2월 4일
From "outside" knowing all the coordinates and connections, or from "inside" with the nodes exchanging information and negotiating the connection ?
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2014년 2월 4일
from "outside"

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by