plot a 2d grid
- From: "Moran Lefler" <moranlf@xxxxxxxxx>
- Date: Thu, 31 Jul 2008 15:26:01 +0000 (UTC)
Hello
I'm writing an implementation for the kohonen SOM (in neural
networks field) and I need to plot a rectangular mesh of
coordinates on a simple 2d plane.
I have a 3-d array which is practically a matrix of
coordinates (a X-by-Y-by-2 array) and I want to plot it
where all neighboring coordinates are connected.
For example:
grid(:,:,1) =
1 2 3
4 5 6
7 8 9
grid(:,:,2) =
9 8 7
6 5 4
3 2 1
so in the plot, I'd want points in (1,9),(2,8),(3,7), etc.
where (1,9) is connected to its neighbors (2,8) and (4,6)
and (5,5) is connected to its neighbors (2,8),(4,6),(8,2),(6,4)
etc...
Someone gave me a solution of using a simple matrix with
complex numbers which will serve as coordinates but this
seems a bit unnatural.
any suggestions?
Thank you
.
- Prev by Date: Re: saving a File in a different directory
- Next by Date: pde toolbox defining initial concentration at a boundary or point
- Previous by thread: cumsum
- Next by thread: pde toolbox defining initial concentration at a boundary or point
- Index(es):
Relevant Pages
|