The purpose of the code is to do a simple math on col(A) and fill the col(B) with the results. The "variable" ranges between 0.5 to 1.5. The col(A) is filled with the numbers ranging between -5~100. But the funny thing is that the code fills the 1st row of the col(B) with the calculated result and fills other rows with "0". This happens only in the very first time of its execution after the Origin is launched. Once the code is executed malfunctionally, the code works fine afterwards. Could anyone give me a comment or suggestion? Thanks.
There is a known bug for calculating the datasets multiplying double numbers. A workaround is changing dsTarget=2*180/pi*asin(sin(0.5*pi/180*dsOriginal)*1.540562/variable); to dsTarget=asin(sin(0.5*pi/180*dsOriginal)*1.540562/variable)*2*180/pi;