How can I calculate a dirac function of 2D discrete signal
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
For example, I have 20 2D points, as the input signal. (xi, yi) i = 1...Z , Assume that Z = 20, i.e. 20 points. How can I calculate this equation? The function is a dirac pulse.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/150280/image.png)
Réponses (2)
Wayne King
le 2 Oct 2013
Modifié(e) : Wayne King
le 2 Oct 2013
Unless I'm missing something, it's just a 1 at the location x_i,y_i in your matrix. For example:
X = zeros(20,20);
X(10,10) = 1;
2 commentaires
Wayne King
le 2 Oct 2013
(xi, yi) is the location of the impulse, that is just shifting the impulse from (0,0) to the location (xi,yi)
Youssef Khmou
le 3 Oct 2013
hi @Wayne King gave you the kernel of the problem, here is another way out:
H=0*meshgrid(linspace(-0.5,0.5,20));
H(floor(end/2),floor(end/2))=1.00;
surf(H)
0 commentaires
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!