I am relatively new to Matlab and I want to generate a hexagonal grid that represents a cellular network where each hexagon has a specific behaviour.
My question is how does one go from a square grid to hex grid (transfer matrix)?. This is what I have so far.
[X,Y] = meshgrid(0:60);
figure(1), plot(X,Y,'b')
hold on, plot(Y,X,'b')
axis square
A few years ago I wrote some code to do just that:
For example, this is the image generated with the above data: