How to make multiple sinc functions?

Hi, I found out from the forum that this is the code for generating one sinc function,
x = -5:.01:5;
plot(x,sinc(x))
Now, can I do multiple of these, like one after the other? But I need to change the frequency after every sinc cycle, is it possible? it will be like a chirp wave with sinc function. Any help will be appreciated, thanks.

Antworten (2)

Image Analyst
Image Analyst am 18 Mai 2013

0 Stimmen

Do you mean like this:
x = -5:.01:5;
plot(x,sinc(x))
hold on
plot(x, sinc(x/3), 'r-');
plot(x, sinc(x/0.25), 'g-');

2 Kommentare

Rohan Repale
Rohan Repale am 18 Mai 2013
Bearbeitet: Rohan Repale am 18 Mai 2013
Ya like that, but can they follow each other on the time scale? Like the first wave goes at 10k, second follows it at 20k and so on?
Just shift the x, like this:
x = -5:.01:5;
plot(x,sinc(x))
hold on
plot(x, sinc((x-2)/3), 'r-');
plot(x, sinc((x-4)/0.25), 'g-');

Melden Sie sich an, um zu kommentieren.

Youssef  Khmou
Youssef Khmou am 18 Mai 2013

0 Stimmen

hi,
Try the code provided by Image analyst, or try also this version :
% different positions for peaks
x = -5:.01:5;
center=[-2:0.2:2];
for n=1:21
M(:,n)=sinc(x-center(n));
end
plot(M)

3 Kommentare

Rohan Repale
Rohan Repale am 18 Mai 2013
Bearbeitet: Rohan Repale am 18 Mai 2013
Thanks Youssef, I can use parts of your code as well. However, I dont want it over lapping, it should follow one another. Like as soon as one gets over, other should start. I have an image but I don't know how attach images here.
Youssef  Khmou
Youssef Khmou am 18 Mai 2013
Bearbeitet: Youssef Khmou am 18 Mai 2013
ok Rohan, in this case you need to enlarge the support axis try :
x=-30:0.1:30;
center=[-20:4:20];
for n=1:length(center)
M(:,n)=sinc(x-center(n));
end
plot(x,M), grid on,
If you want more separating distance, you can change the step in vector "center" from 4 to n>4 .
Image Analyst
Image Analyst am 18 Mai 2013
sinc goes on forever, at least the theoretical formula for it because it's based on the sine function which goes on forever. Please say what criteria you want to use to decide where the sinc function "ends".

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Convert Image Type finden Sie in Hilfe-Center und File Exchange

Produkte

Tags

Gefragt:

am 18 Mai 2013

Community Treasure Hunt

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

Start Hunting!

Translated by