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
 Origin Forum
 Concatenating column values

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
bluewire Posted - 06/21/2018 : 09:29:48 AM
Hi,

to easily export data tables to LaTeX, I need to concatenate column values, but I can't figure out how. For example, I need to concatenate the data values with their errors. The errors need to be put in parenthesis:
Data  Error
0.015 0.003
0.025 0.004
0.035 0.005

The output I'm looking for should look like this:
Output
0.015(3)
0.025(4)
0.035(5)

Is this even possible with Origin? It would be a big hassle if I had to do it by hand. Help is very much appreciated.

Origin b9.5.1.195
Windows 10 64bit
3   L A T E S T    R E P L I E S    (Newest First)
bluewire Posted - 06/21/2018 : 2:22:41 PM
Thanks for the quick help,

the output is needed for a LaTeX-table. The error in parenthesis is formatted as error (i.e. 0.015(5) is formatted as 0.015+-0.005). LaTeX columns are separated by an ampersand, but for that one can just add columns containing ampersands. Maybe in the future there's the possibility to add an export function for LaTeX tables directly. Thanks again for the help.

Greg
cpyang Posted - 06/21/2018 : 12:54:35 PM
This should work



text(A)+"("+text(col(B)*1000)+")"


CP
arstern Posted - 06/21/2018 : 12:50:08 PM
Hi,

You could try to use cell formula:
https://www.originlab.com/doc/Origin-Help/Using-Formulae-to-Set-Cell-Values

To concatenate the two cells i.e. A1 and B1:
=A1$+B1$

But then it would give: 0.015.003

You may need to use text:
=A1$ +text("(")+B1$+text(")")
But this will give 0.015(0.003)

This cell formula will get the output that you described, if all error values start with 0.00X...
=text(A1) +text("(")+mid(B1$,5)+text(")")

Once you create the output, do you want to plot with it? Or will it be just used for labeling or creating a table of data?



-Aviel
OriginLab

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