PAM sampling flat-top of an sinus signal

i need to do a flat-top PAM sampling of an sinus signal of 800Hz with a sampling frequency of 3000hz. I did natural sampling with this code, but i need it falt-topped, i don't know how to do that. Thanks!

Here is my working code for the natural PAM sampling : t = 0:1/Fs:(0.2e-2); fc = 3000; %sampling frequency fm = 800; %message frequency vm = a.*sin(2*pi*fm*t); %message pulseperiods = [0:10]*0.25e-3; pulsewidth = (1/fc)/3; vc = pulstran(t,pulseperiods,@rectpuls,pulsewidth); subplot(3,1,1); plot(t,vm); % plot message xlabel( 'Temps' ); ylabel( 'Amplitude' ); title( 'Message' ); subplot(3,1,2); plot(t,vc); % plot pulse xlabel( 'Temps' ); ylabel( 'Amplitude' ); title( 'Switching waveform' ); subplot(3,1,3); plot(t,y); % plot PAM naturel xlabel( 'Temps' ); ylabel( 'Amplitude' ); title( 'PAM naturel' );
0 Comments

Answers (0)

See Also

Categories

Find more on Signal Processing Toolbox in Help Center and File Exchange

Tags

Community Treasure Hunt

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

An Error Occurred

Unable to complete the action because of changes made to the page. Reload the page to see its updated state.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

You can also select a web site from the following list

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.