The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 get all x-values of the layer

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
abreiti Posted - 12/11/2006 : 08:49:31 AM
Hello,

I have different datasets in one layer, but with different x-values. For further jobs, I need to calculate the mean y-value of every x-value. Is there a possibility to get all x-values together in one column, to calculate the associated mean y-values afterwards?

Thanks Alex
1   L A T E S T    R E P L I E S    (Newest First)
Mike Buess Posted - 12/11/2006 : 11:32:19 AM
Hi Alex,

The following script interpolates all datasets over the same X values and performs Statistics on Rows on the results...

nn=100; // number of X values (adjust to suit)
xx1=layer.x.From; // first X value
xx2=layer.x.To; // last X value
xxi=(xx2-xx1)/(nn-1); // X increment
%Z="";
lay -c;
win -t D;
%W=%H;
col(1)=data(xx1,xx2,xxi);
wo -a count-1;
loop(i,1,count) {wcol(i+1)=%[%Z,#i](col(1))};
wo -s 2 0 wks.ncols 0; // select all Y columns
run.section(WKS,DescStats,1); // statistics on rows
wks.col1.name$=A; // rename column 1
col(1)=%(%W,1);

Mike Buess
Origin WebRing Member

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000