hi how can i get this figure ?
Capture.PNG
i have used the following eq.
Capture2.PNG
by coding the following type;
but it did not work can u please help me with that ? i cannot get negative values. thanks.
t=-511*0.005:0.01:512*0.005;
u_1=3/2*(110*sinc(110*pi*t)-60*sinc(60*pi*t));

2 comentarios

Dimitris Kalogiros
Dimitris Kalogiros el 2 de Sept. de 2019
Hi Adnan
What exactly do want to plot ?
A sync(t) function ? Or function u(t) which you gave ?
ADNAN KIRAL
ADNAN KIRAL el 2 de Sept. de 2019

Iniciar sesión para comentar.

 Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Sept. de 2019
Editada: KALYAN ACHARJYA el 2 de Sept. de 2019

0 votos

t=-linspace(-511*0.005,512*0.005,1000)
u_t=3*(sin(2*55*pi*t)-sin(2*30*pi*t))./(2*pi*t);
plot(u_t);

10 comentarios

ADNAN KIRAL
ADNAN KIRAL el 2 de Sept. de 2019
thanks for quick feedback.
would you please tell me the equivalent of this function in sinc ?
As this function in my code goes infinite form so that i need its sinc formation.
KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Sept. de 2019
Editada: KALYAN ACHARJYA el 2 de Sept. de 2019
Using sinc
t=-linspace(-511*0.005,512*0.005,1000)
u_t=3*((2*55*pi*t).*sinc(2*55*pi*t)-(2*30*pi*t).*sinc(2*30*pi*t))./(2*pi*t);
plot(t,u_t);
Will give the same results.
I am sure, you can do basic multiplication operation to simply the code.
ADNAN KIRAL
ADNAN KIRAL el 2 de Sept. de 2019
many thanks
Torsten
Torsten el 2 de Sept. de 2019
Note that the definition for sinc in MATLAB is
sinc(t) = sin(pi*t)/(pi*t)
So your u_t written in sinc is not correct.
KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Sept. de 2019
Editada: KALYAN ACHARJYA el 2 de Sept. de 2019
Its my pleasure Adnan!
KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Sept. de 2019
Editada: KALYAN ACHARJYA el 2 de Sept. de 2019
sinc(x)=sin(x)/x for otherwise case.
Hence sin(x)=x*sinc(x)
Torsten
Torsten el 2 de Sept. de 2019
Editada: Torsten el 2 de Sept. de 2019
No.
sin(x) = x*sinc(x/pi)
https://de.mathworks.com/help/signal/ref/sinc.html
Now this one sir?
t=-linspace(-511*0.005,512*0.005,1000)
u_t=3*((2*55*pi*t).*sinc(2*55*t)-(2*30*pi*t).*sinc(2*30*t))./(2*pi*t);
plot(t,u_t);
Torsten
Torsten el 2 de Sept. de 2019
This doesn't help since you still divide by 0 at t=0.
If you divide out, you get what I wrote in my answer.
KALYAN ACHARJYA
KALYAN ACHARJYA el 2 de Sept. de 2019
@Torsten OK sir, thanks for rectifying me. I will update it.
Gratitude!

Iniciar sesión para comentar.

Más respuestas (1)

Torsten
Torsten el 2 de Sept. de 2019
Editada: Torsten el 2 de Sept. de 2019

2 votos

t = -511*0.005:0.005:512*0.005;
u_1 = 3/2*(110*sinc(110*t)-60*sinc(60*t));

Categorías

Productos

Versión

R2018b

Etiquetas

Preguntada:

el 2 de Sept. de 2019

Comentada:

el 2 de Sept. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by