k = 7. ;
N = 255 ;
x = 0:N ;
y = 0:N ;
[X,Y] = meshgrid(x,y) ;
I = 1/2*(1+sin(2*pi/N*k*X)) ;
imshow(I)

 Respuesta aceptada

DGM
DGM el 17 de Nov. de 2021
Editada: DGM el 17 de Nov. de 2021
Here's an example. You'll need to adjust it for the number of cycles you want. I'm going to replicate the original image.
s = 512; % image size (assumed square)
n = 4.5; % number of cycles from center to corner
xm = n*sqrt(2)*pi; % figure out what the extents are
x = linspace(-xm,xm,s);
r = sqrt(x.^2 + x.'.^2);
M = im2uint8(0.5 - cos(r)/2);
imshow(M)

1 comentario

jorji
jorji el 17 de Nov. de 2021
Thank you very much for your accurate guidance.

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Preguntada:

el 16 de Nov. de 2021

Editada:

DGM
el 17 de Nov. de 2021

Community Treasure Hunt

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

Start Hunting!

Translated by