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 for Programming
 Forum for Origin C
 interleave data
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

juannim

USA
Posts

Posted - 04/17/2007 :  3:45:27 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Version (Select Help-->About Origin): 7.5
Operating System:xp
I need a labtalk script to interleave data from 2 columns. The first column looks like:
11949
3.0804
3490
0.6206
=
=
=
=

#1
5998
3.333
9520
0.7202
=
=
=
=

#2
6192
3.348
9423
0.7022
=
=
=
=

#3

I want to replace all of the cells containing = with the corresponding values in the adjacent colums. Help? Jonathan

zachary_origin

China
Posts

Posted - 04/19/2007 :  8:34:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Not sure if this is what you want for the "corresponding"...
in your example data, col(1)[5]=col(2)[1], col(1)[6]=col(2)[2]... col(1)[ 8]=col(2)[4] ? Maybe I am wrong...

if it is, the script can be something like:


j=1;
for(i=1;i<wks.nrows;i++)
{
if (col(1)[i]== 0/0)
{
col(1)[i]=col(2)[j];
j++;
}
}



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