| Author | 
                
                  Topic   | 
                
                
                 
                 
                 
                 
                 
                                 | 
               
              
                | 
                 starpuma 
                 
                
                USA 
                2 Posts  | 
                
                  
                    
                      
                       Posted - 04/22/2014 :  12:24:58 AM
                        
                        
                        
                        
                        
                      
  | 
                     
                    
                       Origin Ver. and Service Release (Select Help-->About Origin): OriginPro 8.5 Operating System: Windows 7
  Hey everybody,
  I posted this in wrong forum by mistake. Sorry about that. I have no clue about programming so please bear with me. So, I need to integrate a an upwards of 100 graphs and each one of them have about 200 traces each. So, far I have been using the "Integrate" gadget in Origin but I am nowhere close to being done. 
  So the main problem is that we can only integrate one trace or curve at a time with the "integrate" gadget and since all my integrations have the same basic parameters I figured that it would be relatively easy to automate this rather daunting task because since this is such a repetitive task. I am basically doing an absolute integration over a specific X range. I found this LabTalk script "Integrate Active Curve in Graph over a Specific X Range" from the origin's website (http://www.originlab.com/doc/LabTalk/examples/Peaks-and-Baseline) that almost does what I want. Here is the code:
 
  The following example shows how to integrate the active curve in a graph over a specific range of x values, using the integ1 X-Function.
  // Purpose: This example demonstrates the following: //	1. import a file //	2. create a graph  //	3. integrate the curve over a specific x range
 
  // Create new book and import a sample file newbook; string fname$ = system.path.program$ + "samples\curve fitting\multiple peaks.dat"; impasc;
  // Plot 4th column against 1st column as a line plot plotxy iy:=(1,4) plot:=200;
  // Get row index for x values of 6.5 and 9.5, which covers the 3rd peak in the graph int ix1=xindex(6.5,%c); int ix2=xindex(9.5,%c);
  // Integrate this range of the curve, and list the results of integration range rr=(%c)[$(ix1): $(ix2)]; integ1 rr; integ1.=;
  ______________________________________
  So according to my understanding this basically does what the integration gadget does? But I don't know if this will give me a mathematical or absolute integration.  Here is what I need: I have all the graphs plotted so could somebody please help me modify this code so it would go through all the traces or curves in a graph and integrate them. I would love you forever
 
  Thank you so much! | 
                     
                   
                 | 
               
              
                | 
                 lkb0221 
                 
                
                China 
                497 Posts  | 
                
                  
                    
                      
                       Posted - 04/22/2014 :  10:42:31 AM
                        
                        
                        
                        
                        
                      
  | 
                     
                    
                       Hi, 
  Would you mind send an Email to <tech@originlab.com>, with your serial number? And the I can email you back the script.
  Zheng OriginLab | 
                     
                    
                        | 
                     
                   
                 | 
               
              
                |   | 
                
                  Topic   | 
                
                
                 
                 
                 
                 
                 
                 | 
               
             
           | 
         
       
     |