Recent content by kieranunited9
-
K
IF loop within a FOR loop problem
Thanks for the reply. Apologies, I wasn't very clear. I have posted a version of the for loop below. All variables are initialised and initial conditions specified. I'm not sure why it's not working, I have decided to use the past values of x2 and xc to determine cpto for the current loop. The...- kieranunited9
- Post #3
- Forum: MATLAB, Maple, Mathematica, LaTeX
-
K
IF loop within a FOR loop problem
I am editing code which was developed to model a mass spring damper system in the time domain using the equations of motion of the system. One damping ratio in particular,cpto, was constant originally but I am trying to vary it according to the if statement below. if k3*(x2(i)-x1(i))>=0 &&...- kieranunited9
- Thread
- Loop
- Replies: 5
- Forum: MATLAB, Maple, Mathematica, LaTeX