Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 2015G (32-Bit) Sr2
Operating System:Mac OsX
Hi I'm getting a pretty strange behaviour when using custom functions in a worksheet.
I'm trying to execute the following script:
CountnumberFromChannel(col(A)) / (HeNumber * DetectorSolidAngle * WQFromDepth(DepthFromEnergy(EnergyFromChannel(col(A)))))
with
Function double EnergyFromChannel(int channel) {
return channel * 1,708 + 15,1;
}
Function double DepthFromEnergy(double energy) {
return (1491.325 - energy) / 0.52236;
}
Function double WQFromDepth(double depth) {
return (4.73 + depth * 0.0014 + depth^2 * 5.71429e-7) * 1e-24;
}
Function double CountnumberFromChannel(int channel) {
return 0.29619 + 9766.6711 / ( 28.42699 * sqrt(pi / 2)) * exp(-2 * (channel - 801.57007)^2 / 28.42699^2);
}
Const HeNumber = 2e-5 / (1.60217646e-19);
Const DetectorSolidAngle = 3.362e-3;
as the script inserted. I imported this project from a colleague with colums depending on the coloumn of this script. But after I used str+q to look at the script and pressed ok all the column values vanished to --(on my partners computer it works just fine he's using the same version on windows!). What is causing that behaviour?