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
 LabTalk scripts for integration and plotting

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
krpaudel Posted - 11/08/2013 : 9:02:42 PM
Hello all,
I am still struggling in programming.
I wanted to subtract second column from rest of the 300 columns in a worksheet, then integrate each columns and then plot one graph with the values of integrals on y-axis and numbers from 1 to 300 in order on x axis.
Would anyone please help me in this?

K.Paudel
1   L A T E S T    R E P L I E S    (Newest First)
greg Posted - 11/11/2013 : 11:49:36 AM
This should do it:

%N = %H; // Remember our worksheet
newbook name:=Integrations sheet:=1 option:=lsname; // Create result book
range raX = 1; // Result index
range raY = 2; // Result area
win -a %N; // Go back to our data
// Fow all columns beyond 2
loop(ii,3,wks.ncols)
{
wcol(ii)-=col(2); // subtract column 2
integ wcol(ii); // integrate
raX[ii-2] = ii-2; // Fill in X
raY[ii-2] = integ.area; // Fill in Y
}
plotxy (rax,ray) plot:=201; // plot

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