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
 Forum for Origin C
 integrate graphs

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
Schippi Posted - 12/17/2015 : 04:39:50 AM
Origin Ver. and Service Release (Select Help-->About Origin): 9.0
Operating System: Windows 7

Hello everyone,
this is my problem:
I have got a workbook with about 20 worksheets which I have to integrate and then to form the average value.
The program I have got works but it records everything in 1 workbook and within this workbook in 1 worksheet.
How can it be managed to get several worksheets.

Lots of thanks in advance!

// BEGIN SCRIPT
// PROMPT for X range and calculation method
ix1 = 1.0;
ix2 = 2322.0;
choice$ = Math Absolute;
ichoice = 1;
getn (From) ix1 (To) ix2 (Method) ichoice:choice$ (Integrate all plots);
// Setup
ichoice--;
newbook name:=Results;
layer.name$ = Areas;
range raData = 1;
range raArea = 2;
count = 0;
//range raAverage = 3;
cnt =0;
average= 0;
// Loop over all graphs then all plots in each graph
doc -e P
{
doc -e DY
{
count++;
range -w raC = %C;
xi1 = xindex(ix1,%C);
xi2 = xindex1(ix2,%C);
integ1 iy:=raC[xi1:xi2] baseline:=0 type:=$(ichoice) area:=myarea;
raData[count]$ = %C[x$(ix1):$(ix2)];
raArea[count] = myarea;
cnt = cnt +myarea ;
//raAverage [count] = cnt;
}
}
average= cnt / count;
raData[count + 1]$ = Mittelwert;
raArea[count + 1] = average;
1   L A T E S T    R E P L I E S    (Newest First)
SeanMao Posted - 12/19/2015 : 03:59:29 AM
Hi,

If you want to output the integration results in different new sheets in a new book, you can run the following:

newbook myresults;

...
integ1 iy:=raC[xi1:xi2] baseline:=0 type:=$(ichoice) area:=myarea oy:=["myresults"]<new>!(<new>,<new>);
...

Give it a try and see how it goes.

Regards!

Sean

OriginLab Tech.

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