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
 Whai is does " set %k -x Data1_A$(i) " mean ?

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
scs_emi Posted - 07/15/2015 : 07:39:50 AM
Hi there

I have to maintain an old program that uses a LabTalk script to draw some charts. This script does not run correctly. Since I am a total beginner with Origin Labtalk I have the following question: My code opens 2 data-sources and is supposed to draw the data into 1 graph. When I execute my code it opens an empty graph without data.
___________________________________________________________________

%A=C:\A_Grid#2a.dat;
%B=C:\A_Grid#2b.dat;
xn= 41;
...
window -a Data1;
for (i=1;i<=xn;i+=1) {
worksheet -t $(i*2-1) 4;
worksheet -n $(i*2) B$(i);
worksheet -n $(i*2-1) A$(i);
}
window -i;
window -a Data2;
for (i=1;i<=yn;i+=1) {
worksheet -t $(i*2-1) 4;
worksheet -n $(i*2) B$(i);
worksheet -n $(i*2-1) A$(i);
}
window -i;
window -a Plot;
for (i=1;i<=xn;i+=1) {
%k=Data1_B$(i);
set %k -x Data1_A$(i); // without these lines it works but Why?
layer -i %k;
}

for (i=1;i<=yn;i+=1) {
%k=Data2_B$(i);
set %k -x Data2_A$(i); // without these lines it works but Why?
layer -i %k;
}

___________________________________________________________________

When I leave out the following lines, it works.

set %k -x Data1_A$(i);

set %k -x Data2_A$(i);

Does anybody know

- what this line is supposed to do?
- What the set-command is?
- What -x means ?

Thanks for your help.

itelly
1   L A T E S T    R E P L I E S    (Newest First)
cdrozdowski111 Posted - 07/15/2015 : 12:27:37 PM
itelly,

Here is the documentation on the command:

http://www.originlab.com/doc/Labtalk/Ref/Set-cmd#-x_value.3B_Associate_an_X_dataset_with_a_Y_dataset

Those lines of code are attempting to change the associated X column for each of the Y columns plotted in the graph. But if it works correctly without those 2 lines, then just comment them out.

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