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
 Extraction of data from a column

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
Coder12 Posted - 02/14/2018 : 7:20:58 PM
Origin Ver. and Service Release (Select Help-->About Origin): Origin Pro 8.1 SR3
Operating System: Win7

Hi everyone. I have the following problem:

I have a lot of data in Col(A). I now want now only to use a certain range of rows - lets say from row aa to row bb - in Col(A). The rest can be discarded. I tried the following script (and variations thereof):


int aa = "some variable defined by other parameters"
int bb = "some variable defined by other parameters"
range Data = 1[aa:bb];
Col(B) = Data;
delete Col(A);


Either nothing really happens or the entirety of Col(A) is copied to Col(B). How can I put variables as parameters into a range? It should be possible, right?
Also, if you have suggestions how to more elegantly solve my goal (eg extract data from a column), then I would rally appreciate it.

I wanted to add that I already "achieved" my goal by copying the individual cells via a for-loop. However, considering that my datasets can range between 1-4 million, I am pretty sure that this approach will be way to time consuming.
3   L A T E S T    R E P L I E S    (Newest First)
Coder12 Posted - 02/15/2018 : 12:35:58 PM
I upgraded to Origin 8.6 SR2 b98.
However, it does not resolve the issue. Is it even possible to use int variables as parameters for a range variable (I mean, it should be)?

Edit: Nevermind! I just messed up the syntax when I tested it in Origin8.6. It now works as intended, thank you very much.
Coder12 Posted - 02/15/2018 : 11:29:44 AM
quote:
Originally posted by Hideo Fujii

Hi Coder12,

You code works in my Origin 2018. Probably because of the bug in Origin 8.1? If you wonder, you can install
and try Origin's latest Evaluation version.

--Hideo Fujii
OriginLab

P.S. Note that according to your code, if the column B was filled by lots of values, original data remain after
(bb-aa)-th row.


Huh. Good to know about the bug. I will try a more recent version of Origin. And I plan on later deleting Col(A) (or just deleting the rows in Col(A) that do not interest me).
Thanks for your help!
Hideo Fujii Posted - 02/15/2018 : 10:21:00 AM
Hi Coder12,

You code works in my Origin 2018. Probably because of the bug in Origin 8.1? If you wonder, you can install
and try Origin's latest Evaluation version.

--Hideo Fujii
OriginLab

P.S. Note that according to your code, if the column B was filled by lots of values, original data remain after
(bb-aa)-th row.

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