% % Homework 3 (Wednesday Class) - Sample Solution % Show RC Exponentional Growth using plot/fplot % clear all % Time index t = [0:0.1:5]; % Voltage Equations v1 = 1 - exp(-t); v2 = 1 - exp(-2*t); v3 = 1 - exp(-3*t); % Voltage 1 using plot subplot(3,1,1); plot(t,v1); title('V = 1 - exp(-t) [ plot ]'); % Voltage 2 using plot subplot(3,1,2); plot(t,v2); title('V = 1 - exp(-2*t) [ plot ]'); % Voltage 3 using plot subplot(3,1,3); plot(t,v3); title('V = 1 - exp(-3*t) [ plot ]'); pause % Voltage 1 using fplot subplot(3,1,1); fplot('1-exp(-x)', [0 6 0 2]); title('V = 1 - exp(-t) [ fplot ]'); % Voltage 2 using fplot subplot(3,1,2); fplot('1-exp(-2*x)', [0 6 0 2]); title('V = 1 - exp(-2*t) [ fplot ]'); % Voltage 3 using fplot subplot(3,1,3); fplot('1-exp(-3*x)', [0 6 0 2]); title('V = 1 - exp(-3*t) [ fplot ]');