Graph appears blank but the equation and code are correct.
Afficher commentaires plus anciens
Hi,
I'm graphing a Gaussian function that resembles the inverse impulse response, which should look like this:

However, the graph on matlab appears blank and I can't figure out the problem.
My code:
H_k_eq = @(k) (exp(-pi.*k.^2)) / (exp(-pi.*k.^2) + exp(-pi.*(4.*k).^2));
Range = -0.5:.01:0.5;
plot(Range,H_k_eq(Range))
What is wrong with my code?
Réponse acceptée
Plus de réponses (1)
H_k_eq = @(k) (exp(-pi.*k.^2)) ./ (exp(-pi.*k.^2) + exp(-pi.*(4.*k).^2)); %<-- element by element division
Range = -0.5:.01:0.5;
plot(Range,H_k_eq(Range))
1 commentaire
Nathan
le 23 Sep 2022
Catégories
En savoir plus sur Mathematics dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


