Author |
Topic |
|
thentangler
USA
Posts |
Posted - 07/30/2010 : 12:29:10 AM
|
Origin Ver.8.1 SR3 Operating System: Win 7
Hi, I have a problem setting Long Names in my columns. I have a huge amount of data and plan to do some preliminary calculations while importing. I use the Labtalk script while importing. I have two columns A and B in ascii files. I create a new column C while importing and assign Col(C)=abs(Col(B)); But I want to assign a Long Name to Column C so that When i plot it I can automatically use it int he legend. Any Help will be greatly appreciated. Thanks
|
|
applenano
China
9 Posts |
|
thentangler
USA
Posts |
Posted - 08/05/2010 : 02:42:06 AM
|
Hi Applenano, Thank you so much for the reply. It works like a charm |
|
|
dimidola
Switzerland
Posts |
Posted - 01/27/2011 : 06:15:08 AM
|
Is there a way to set the long name of a column as a value from the workbook?
ie. if col(c)[1] contains the name of the experiment and after some processing I got my results to col(d) and I want to name col(d) as whatever is written in col(c)[1]
thank you!!! |
|
|
greg
USA
1378 Posts |
Posted - 01/28/2011 : 1:15:37 PM
|
You can use this
col(C)[L]$ = col(C)[1]$; // $ implies string value This notation is preferred over wks.col3.label$ = col(C)[1]$ or wks.col$(colnum(C)).label$ = col(C)[1]$
If your entire first row is actually text that you want to use for Long Names, then consider modifying the import to put that row into Long Name rather than data. You can also use
wrow2label longname:=1;
which is equivalent to selecting row 1, right-clicking and choosing Set as Long Name. |
|
|
dimidola
Switzerland
Posts |
Posted - 01/30/2011 : 06:07:19 AM
|
quote: Originally posted by greg
You can use this
col(C)[L]$ = col(C)[1]$; // $ implies string value
Thanks! it works! so, can I get my longname to be two different values from my worksheet, or have a name and a value?
like if I have col(a): response: 1 2 3 4 5 4 3 2 1 0 col(b): time: 1 2 3 4 5 6 7 8 9 10 col(c): peak response: 5 col(d): time at peak response: 5
and I want to have my col(a) longname set to: "peak@(5,5)"
so, I'd expect it to be like: col(a)[L]$ = "peak@(" col(c)[1]$ "," col(d)[1]$ ")"
but of course (since I know so little about scripts) it doesn't work...
thanks a million! |
|
|
vincenth
30 Posts |
Posted - 02/02/2011 : 1:21:59 PM
|
Hi,
Try the following:
col(a)[L]$ = "peak@(" + col(c)[1]$ + "," + col(d)[1]$ + ")";
You can simply "add"/concatenate the string elements together with the + operator, putting literals in quotes.
Regards, Vince OriginLab Corp. |
Edited by - vincenth on 02/03/2011 09:38:53 AM |
|
|
dimidola
Switzerland
Posts |
Posted - 02/23/2011 : 10:43:48 AM
|
Oh my! it works like a charm! |
|
|
|
Topic |
|