DistCoop
Electrical
- Jan 2, 2013
- 83
Hello everyone,
I'm thinking I must be making this too difficult, but I'm not able to figure it out. I have within a function a loop that I want to run continuously for some period of time, and plot the results. I've tried to make a variable t within the loop. At the end of the while loop, I increment variable t by my desired increment (0.005 seconds). I want the loop to run until my variable t has incremented to 2 seconds. It looks like I need to define t as a range variable outside of the function though.
Any thoughts on the way to accomplish this?
I'm thinking I must be making this too difficult, but I'm not able to figure it out. I have within a function a loop that I want to run continuously for some period of time, and plot the results. I've tried to make a variable t within the loop. At the end of the while loop, I increment variable t by my desired increment (0.005 seconds). I want the loop to run until my variable t has incremented to 2 seconds. It looks like I need to define t as a range variable outside of the function though.
Any thoughts on the way to accomplish this?