I have this signal shifted by 7000 on the t axis
g(t) = 4000 * sinc(4000 * t) * e^(j * 2 * pi * 7000 * t)
I tried to replicate this in matlab to get the sinc graph, but does not work:
j = sqrt(-1);
x = linspace(-9000,9000);
y = (4000 * sinc(4000 * x)) * (exp(j * 2 * pi *7000 * x));
plot(x,y)
grid
Can anyone help me? Thanks!

 Respuesta aceptada

madhan ravi
madhan ravi el 22 de Mayo de 2020
Editada: madhan ravi el 22 de Mayo de 2020

1 voto

y = (4000 * sinc(4000 * x)) .* (exp(j * 2 * pi *7000 * x)); % .*!!
Note: By default j is an imaginary number in MATLAB

3 comentarios

Moisa Tedy Gabriel
Moisa Tedy Gabriel el 22 de Mayo de 2020
In fact i get this warning. Is it ok?
Warning: Imaginary parts of complex X and/or Y arguments ignored.
> In untitled (line 4)
Moisa Tedy Gabriel
Moisa Tedy Gabriel el 22 de Mayo de 2020
ty

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by