Im trying to implement this equation in matlab

1 visualización (últimos 30 días)
shadi
shadi el 8 de Dic. de 2023
Editada: Matt J el 8 de Dic. de 2023
i have a matrix x[k,l] and vector k'=[-1 -5 3 4 2] and l'= [0 1 5 3 10 15 ] h'= [ 5 4 2 5 4]
how can i shift the matrix circularly by k' and l' and do the convluation with h[k' , l' ]= h' e^2*pi*k' * l' like the equation below
this is the equation that i want to implement it
y[k, l] = ∑k'=-kv to kv ∑l=0 to l' = h[k' , l' ] x[[k − k' ]N , [l − l' ]M] and and [·]N , [·]M denote modulo N and M operations
  1 comentario
Matt J
Matt J el 8 de Dic. de 2023
Why not just implement the circulant convolution with FFTs?

Iniciar sesión para comentar.

Respuestas (1)

Matt J
Matt J el 8 de Dic. de 2023
It's normally better to use FFTs for cyclic convolution, but if you insist on doing it on the non-Fourier domain, then you can use this:
function z=cyconv(x,y)
%Non-Fourier domain cyclic convolution
%
% z=cyconv(x,y)
siz=num2cell(size(x));
subs=cellfun(@(n)[2:n,1:n],siz,'uni',0);
x=x(subs{:});
z=convn(x,y,'valid');
end
  2 comentarios
shadi
shadi el 8 de Dic. de 2023
yes sir, i want to do by ffts how it can be please
Matt J
Matt J el 8 de Dic. de 2023
Editada: Matt J el 8 de Dic. de 2023
convolutionResult=ifft(fft(x).*fft(y));

Iniciar sesión para comentar.

Etiquetas

Productos


Versión

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by