How to generate a square lattice structure.

26 Ansichten (letzte 30 Tage)
Subhashish Tiwari
Subhashish Tiwari am 5 Aug. 2015
Beantwortet: Sara am 26 Jun. 2020
In the attached image there is a square lattice shaped structure of air holes. Please tell me how to generate it using matlab code.

Antworten (2)

Rohit Kudva
Rohit Kudva am 7 Aug. 2015
Hi Subhashish,
I am not sure about your use case for developing this square lattice structure. Do you want it for some kind of analysis?. In case you just want the MATLAB code to draw this figure, You can use the ' rectangle ' function to draw out the main square frame and then use the ' viscircle ' function to draw the circles. Note that the 'viscircle' function is a part of the Image processing Toolbox. If you don't have one, you can use the 'rectangle' function to draw the circle as well by setting the curvature property to [1 1]. You can also refer to the ' Pattern Generator for MATLAB ' File Exchange submission that seems to generate similar lattice structures.
- Rohit
  3 Kommentare
Mariam Kavai
Mariam Kavai am 30 Jan. 2019
Hi subhashish, could you please send me the code for a hexagonal lattice. I appreciate it.

Melden Sie sich an, um zu kommentieren.

Sara am 26 Jun. 2020
create zeros materix
create disc materix
set for function to add the disc into the zeros materix
from here you can set the diatnce btween each disc
gaussan the final image to obtain similar image as you can see in any TEM image


Mehr zu Read, Write, and Modify Image finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by