Hi, I have a problem that I'm not able to solve. I import a TXT file into origin worksheet and perform some operation on it. I wrote a script that, with a for loop, search from column A a value (varh, previously stored). When the cell value match the variable stored the script assign the corresponding value from column G to varl variable. I run the script and with almost all the TXT files a have it works well except one. It seems it don't enter in the for loop because nothing happens. The only difference from this TXT file with the other is the lenght: about 23000 points. So my question is: has Origin some limits on managing a large number of points? I think this is not the problem but I tried everything! Please, any suggestion? Thank you
limit originaldata_A; for (ii=limit.size; ii>1; ii--){ if (originaldata_A[ii]==varh) {varl=originaldata_G[ii]}};
I don't see anything wrong with your script and don't think there are any hidden limitations. However, this accomplishes the same thing more efficiently...
limit originaldata_A; for(ii=1;ii<=limit.size;ii++) { if (originaldata_A[ii]==varh) {varl=originaldata_G[ii]; break}; };