FPGA file

Please download to get full document.

View again

of 16
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.


Publish on:

Views: 20 | Pages: 16

Extension: PDF | Download: 0

  Program No. 1 Question.   Write a program in MATLAB for Plotting Continuous Signal of unit impulse, unit step and unit ramp.   Solution:   a)   Unit impulse >>%unit impulse >>subplot(2,1,1); >> t=-2:1:2; >> y=[zeros(1,2),ones(1,1),zeros(1,2)]; >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('UNIT IMP');  b)   Unit step >> % unit step >>subplot(2,1,2); >> t=-1:1:6; >> y=[zeros(1,1),ones(1,7)]; >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('UNIT Step') c)   Unit ramp >> %unit ramp >>subplot(2,1,3); >> t=0:1:3; >> y=t; >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('UNIT RAMP');       Program No. 2   Question.   Write a program in MATLAB for Plotting Continuous Signal of exponential wave, rectangular wave, sine wave, cosine wave and signum function. Solution: a)   Exponential wave >> %exponential wave >>subplot(2,2,1); >> t=0:0.2:6; >> y=exp(t); >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('Exponential function');  b)   Rectangular Wave: >> %rectangular pulse >>subplot(2,2,2); >> t=-2:1:2; >> y=[ones(1,5)]; >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('Rectangular pulse'); c)   Sine Wave: >> %sine wave >>subplot(2,2,3) >> t=-pi:0.1:pi; >> y=sin(2*pi*t); >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('Sine wave'); d)   Cosine fun >> %Cosine fun >>subplot(2,2,4); >> t=-pi:0.1:pi; >> y=cos(2*pi*t); >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('Cosine Wave');  e)   Signum function >> %signum >>subplot(2,2,5); >> t=-4:1:4; >> y=[-ones(1,4),ones(1,5)]; >>plot(t,y); >>xlabel('Time'); >>ylabel('Amp'); >>title('Signum');
Related Search
Similar documents
View more...
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks