I have this piece of code, within my Main method:
for(int i = 0; i < 2; i++){
double psd = JMath.sqrt((((4*cc)/(JMath.pow((1 + 6*frequency[i]*cc), (double) 5/3)))*df));
double cohC = H*JMath.sqrt((frequency[i]/A.averageHubWindSpeed)*(frequency[i]/A.averageHubWindSpeed) + (.12/Lc)*(.12/Lc));
BLAS.getInstance().sscal(packDistance.length, (float) cohC,packDistance, 1);
}
This way packDistance is overwritten, so for i == 1, sscal will multiply cohC with the packDistance stemming from the sscal at i == 0. Instead, I want packDistance to hold the same original values, which are assigned outside the loop.
How could I overtake this issue?