Hi, im working on some university coursework and am trying to do something with my plots. Id like someone to tell me if what im trying to do is possible, and if it is, how to do it?
The coursework is based on 2nd order ODE's. not using a numerical solver, I need to write a script which allows a user to input values for R, L & C, solves the 2nd order ODE, tells the user if the system is Under, Critically or Over damped and then plots voltage against time. (All of which i have already done).
My problem starts here; If the user is inputting different values each time, the plot will be different (voltage & time). the voltage on the Y axis automatically sets its own limits. However time along the x axis doesnt. This is because my voltage equation requires me to input time as a array.
Question: is it possible to write a script that changes the maximum point on the x axis (time) so that the graph captures the full transient?
See the attached figures, 'Good' shows the type of outcome im looking for, 'Bad' shows what im trying to stop happening when the user puts in different values to what i tested with.