How do I fix the issue of duplication in the following code? The first entry is the same as the second for example.
Input:
import numpy as np
t_max=np.arange(0,2.1,0.1)
for j in range (2,len(t_max)):
time=np.arange(t_max[2],t_max[j]+0.1,0.1)
print(time)
Output:
[0.2 0.3]
[0.2 0.3]
[0.2 0.3 0.4]
[0.2 0.3 0.4 0.5]
[0.2 0.3 0.4 0.5 0.6]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. ]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9]
[0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1. 1.1 1.2 1.3 1.4 1.5 1.6 1.7 1.8 1.9
2. ]
t_max[j] + 0.11as the second parameter of thearange.