In the link below is my code which generates numerical data of a Fourier series of an impulse function (not to be confused with the DIRAC DELTA IMPULSE). The issue is as k increases the harmonic frequencies become faster than the time step which causes resolution issues at higher k values. Is there a way to iteratively change the time step for each iteration of k value? However, the range for t would have to correspondingly decrease or the file size would balloon by the corresponding change in k value.
So lets say my time step for k = 1 is 0.001 and my time range is 0..1, now for k = 1000 my time step would be 0.000001, but my time range would shrink from 0..1 to 0..0.001. I hope this is not too confusing. Maybe experimenting with my code will aid in understanding my request.
Thanks for any assistance