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
 CSV import and post processing

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
skramini Posted - 05/17/2016 : 7:53:23 PM
Origin Ver. 9.0.0 and Service Release SR2 (Select Help-->About Origin):
Operating System: win 7

Hello, I would like to use Origin C or Labtalk to do the following.

1.Partial import (1201:1315) rows from say 1000 data sets as columns in a single worksheet. Each data set is a .txt file with timestamp in seconds as its label (eg: 0925628.txt)
2.Subtract first data set from each column to get differential spectrum

I never wrote code in Origin. Can someone help in this regard or at least show the direction I can go to.

Thank you,
Shiva.

4   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 05/20/2016 : 03:31:56 AM
Hello,

You can try to loop through the columns in this way:

for(i=1;i<200;i++){ //loop through each column

col($(i))=col($(i))-col(201); // substrate by reference
}


Best regards!
Jason
OriginLab Technical Service
skramini Posted - 05/19/2016 : 6:29:27 PM
Hello jason,
Thanks for the reply.
I was able to import the data into columns of my worksheet.
I need to subtract all these columns with a reference column.
Is it possible to write a small code that can do it for all the columns at a time.
I have about 200 columns and each has to be subtracted with a single reference column.
Thank you.
Shiva

quote:
Originally posted by jasonzhao

Hello,

Please refer to the examples below for Partial Import by using LabTalk:
http://www.originlab.com/doc/LabTalk/examples/Data-Import#Partial_Import
and importing Multiple Files
http://www.originlab.com/doc/LabTalk/examples/Data-Import#Importing_Multiple_Files

Best regards!
Jason
OriginLab Technical Service



Shiva K Ramini
harleybike01 Posted - 05/19/2016 : 2:48:44 PM
Travels with Harley – Journeys in Search of Personal and National Identity, retired U.S. Army Colonel Christopher Holshek is organizing a National Service Ride from late August to late October to promote better citizenship, service, and social responsibility in and beyond America: “When we become better citizens, we become a better country – because, when you serve your community, you serve your country.”

http://www.nationalserviceride.net/

[url=http://www.nationalserviceride.net/]Travels with Harley[/url]
jasonzhao Posted - 05/17/2016 : 10:40:37 PM
Hello,

Please refer to the examples below for Partial Import by using LabTalk:
http://www.originlab.com/doc/LabTalk/examples/Data-Import#Partial_Import
and importing Multiple Files
http://www.originlab.com/doc/LabTalk/examples/Data-Import#Importing_Multiple_Files

Best regards!
Jason
OriginLab Technical Service

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