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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Concatenating column values
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

bluewire

Germany
2 Posts

Posted - 06/21/2018 :  09:29:48 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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

Edited by - bluewire on 06/21/2018 09:46:21 AM

arstern

USA
237 Posts

Posted - 06/21/2018 :  12:50:08 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page

cpyang

USA
1406 Posts

Posted - 06/21/2018 :  12:54:35 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
This should work



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


CP
Go to Top of Page

bluewire

Germany
2 Posts

Posted - 06/21/2018 :  2:22:41 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
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
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000