%tic clear t = 260; L=1; NN=50; x(1:NN)=0; for I=1:(NN+2)/2, x(I)=sin(2*I*pi/(NN+1)); end options = odeset('RelTol',1e-7,'OutputFcn','odeplot','OutputSel',[1]); [t x] = ode45('complex1', [0:L:t], x, options); for I=1:NN, q(:,I)=real(x(:,I)).^2+imag(x(:,I)).^2; end