Shafayat__

Untitled

Aug 18th, 2023
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 0.35 KB | None | 0 0
  1. clc;
  2. clear all;
  3. close all;
  4.  
  5. t=0:1:7;
  6. u = [ones(1,1).*1 ones(1,2).*2 ones(1,1).*5 ones(1,1).*5 ones(1,2).*2 ones(1,1)];
  7. subplot(2,1,1);
  8. plot(t,u);
  9. xlabel('Time');
  10. ylabel('Amplitude');
  11. title('Signal 1');
  12.  
  13. t=0:1:6;
  14. u1 = [zeros(1,1) ones(1,5) zeros(1,1)];
  15. subplot(2,1,2);
  16. plot(t,u1);
  17. xlabel('Time');
  18. ylabel('Amplitude');
  19. title('Signal 2');
Advertisement
Add Comment
Please, Sign In to add comment