Skip to content

Instantly share code, notes, and snippets.

@haldun
Created October 11, 2012 06:19
Show Gist options
  • Save haldun/3870544 to your computer and use it in GitHub Desktop.
Save haldun/3870544 to your computer and use it in GitHub Desktop.
comp242-11-10-2012
t = 0:0.01:2.5;
voltage = sin(2 * pi * 10* t);
current = cos(2 * pi * 10 * t);
% draw first plot
subplot(2, 1, 1); plot(voltage);
title('voltage'); xlabel('time(sec)'); ylabel('volts');
% draw second plot
subplot(2, 1, 2); plot(current);
title('current'); xlabel('time(sec)'); ylabel('amperes');
m1 = 10; % mag of signal 1
m2 = 1;
m3 = 1/2;
t = 0:0.05:10;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment