t = linspace(0, 1, 1000);
theta = 1;
V_rest = -1;
R = 1;
I = 1;
V = V_rest+I.*R.*(1-exp(1).^(t/theta));
plot(t, V, 'b-', 'LineWidth', 2);
grid on;
title('V vs. t', 'FontSize', 18);
xlabel('t', 'FontSize', 18);
ylabel('V', 'FontSize', 18);
yline(-2, 'LineStyle', '--', 'Color', 'r', 'LineWidth', 2);
hold on;
plot(xlim, [-2.5, -2.5], 'm--', 'LineWidth', 2);
hold off;
3 Comments
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/630393-hold-on-function-doesn-t-work#comment_1095403
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/630393-hold-on-function-doesn-t-work#comment_1095403
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/630393-hold-on-function-doesn-t-work#comment_1095513
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/630393-hold-on-function-doesn-t-work#comment_1095513
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/630393-hold-on-function-doesn-t-work#comment_1095568
Direct link to this comment
https://fr.mathworks.com/matlabcentral/answers/630393-hold-on-function-doesn-t-work#comment_1095568
Sign in to comment.