T O P I C R E V I E W |
axel3 |
Posted - 04/15/2003 : 05:12:46 AM I have a problem with performig the derivatives of a large worksheet. The worksheet consists of 450 columns and 6224 rows. The script below results in failing of origin at about the 230 th collumn. Can anybody help me to improove the scrip to perform the derivatives of all 450 colummns. Thank you. S=450; %o=dataPC; // legt source file fest win -a %o; // setzt PCdata als aktives Fenster type -qp 0; // schaltet arith. Botschaft in Statuszeile aus;
for(j=1;j<=S;j++) {
type -q "j=$(j)"; // gibt j in der Stauszeile aus
create derv_B$(j) 10; edit derv_B$(j);
if(j==1) { // x-Spalte Name+Inhalt %L=%o!wks.col$(j).name$; derv!wks.col$(j).name$=%L; derv_%L=%o_A; curve.x$=%o_A }; // Name der x-Spalte, die benutzt wird
%L=%o!wks.col$(j+1).name$; // j-te y-spaltennamen (PC) lesen // type"%L"; derv!wks.col$(j+1).name$=%L; // j-te y-spaltennamen (derv) benennen curve.data$=%o_%L; // y-spalte curve.result$=derv_%L; // Ergebnis spalte curve.derivDeg=1; curve.polyDeg=2; // Ordnung der Funktion curve.SmoothPts=5; // Glaettungspunkte an jeder Seite curve.i1=-1; curve.sgderiv(); }; win -i %o; // minimiert PC Fenster win -i derv; // minimiert PC Fenster |
4 L A T E S T R E P L I E S (Newest First) |
axel3 |
Posted - 04/25/2003 : 09:11:09 AM I use version 6.1. I think the problem seems to create a worksheet with more than 240? columns. I try your suggestions but than origin always aborted. I found a way to perform 450 derivatives by first duplicating the origal worksheet and second differetiate the original wks and put the result into the duplicated wks. Thanks again for thinking about this problem Axel |
Mike Buess |
Posted - 04/22/2003 : 11:09:59 AM Hi Axel,
It would still be useful to know which version of Origin you're running. Some versions had problems with wks.col[n] properties for large n and others had problems with winname! referencing. To cover all bases you might try these changes.
Replace the following two lines...
%L=%o!wks.col$(j).name$; derv!wks.col$(j).name$=%L;
with
%L=%(%O, @C, j); win -o derv {wo -n j %L};
and these lines...
%L=%o!wks.col$(j+1).name$; // j-te y-spaltennamen (PC) lesen // type"%L"; derv!wks.col$(j+1).name$=%L; // j-te y-spaltennamen (derv) benennen
with
%L=%(%O, @C, j+1); win -o derv {wo -n (j+1) %L};
Let us know if that helps or not.
Mike Buess Origin WebRing Member
Edited by - Mike Buess on 04/22/2003 11:16:01 AM |
axel3 |
Posted - 04/22/2003 : 04:20:54 AM quote:
Have you verified that your worksheet actually contains 450 columns? Prior to Origin 7 (or perhaps 6.1) around 230 columns were the most you could import.
Mike Buess Origin WebRing Member
Yes, I have veryfied my worksheet contains 450 columns with 6200 rows. But you are right the script I posted abort around the 230th column. Is there any chance to avoid this? The way I just use is to split the worksheet and merge the parts after performing the derivatives. Thank you for thinking abuot my problems. Axel |
Mike Buess |
Posted - 04/15/2003 : 08:07:52 AM Have you verified that your worksheet actually contains 450 columns? Prior to Origin 7 (or perhaps 6.1) around 230 columns were the most you could import.
Mike Buess Origin WebRing Member |