Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- % %PLOT UNIT STEP FUNCTION
- t=[-10:1:10];
- us=(t>=0);
- subplot(2,2,1);
- plot(t,us);
- % plot(t,us);
- xlabel('Values of t'); %FOR LABELING X AND Y
- ylabel('Amplitude x(t)');
- title('unit step-101915122');
- %
- % %PLOT UNIT IMPULSE FUNCTION
- t=[-10:1:10];
- usi=(t==0);
- subplot(2,2,3);
- plot(t,usi);
- xlabel('Values of t'); %FOR LABELING X AND Y
- ylabel('Amplitude x(t)');
- title('uit impulse 101915122');
- %
- % %PLOT UNIT STEP FUNCTION
- t=[-10:1:10];
- us=(t>=0); %BY DEFAULT VALUE IS 1
- subplot(2,2,2);
- stem(t,us);
- stem(t,us);
- xlabel('Values of n'); %FOR LABELING X AND Y
- ylabel('Amplitude x(n)');
- %
- % %PLOT UNIT IMPULSE FUNCTION
- t=[-10:1:10];
- usi=(t==0);
- subplot(2,2,4);
- stem(t,usi);
- xlabel('Values of n'); %FOR LABELING X AND Y
- ylabel('Amplitude x(n)');
- for x=-10:1:10
- if x>=0;
- a=1;
- hold on;
- else
- a=-1;
- hold on;
- end
- stem(x,a);
- xlabel('Values of n'); %FOR LABELING X AND Y
- ylabel('Amplitude x(n)');
- title('signum 101915122');
- end
Advertisement
Add Comment
Please, Sign In to add comment