Hello, how to define an expression, for example 1-e^(-At) where I can define and change parameters A and t and than figure changes of the curve in a graph.
Thanks
Best Answer
Simplest version I can think of
t=0:0.1:100; % Time vector
A=0.1; % Value of A that you can change
plot(t,1-exp(-A(n)*t)) % Represent it on a figure
If you place the cursor on the value of A you can try several values using the Editor tools (look on the tools of your editor window- 1.0 + ... press those symbols and the script runs with a new value for A)
I have used array ‘tp’ and ‘Yp’ to store values of ‘t’ and ‘Y’ respectively for evey time step and used it to make the final plot. Below mentioned is the modified code:
Best Answer