The Duffing Oscillator is as follows:
To do this, we have to use the Euler-Cromer method to solve, which follows the following syntax:
My code is as follows:
I just keep getting "Unable to perform assignment because the left and right sides have a
different number of elements." For the line which I went ahead and bolded
I've never used the Euler-Cromer method before, so maybe I'm doing something wrong, but honestly am not sure. Help would be much appreciated!