I have written the following code, whose Elapsed time is 32.427771 seconds.
for i = 3.53:0.0001:4.67
for j = -6.17:0.0001:-4.53
ObsX(t) = j;
ObsY(t) = i;
I have rectangular obstacle with the coordinates 3.53:4.67 and -6.17:-4.53 and the resolution is 0.0001. I am trying to store the X coordinates in array ObsX and Y coordinates in array ObsY.
Can you suggest way to improve the computation time? Thanks!