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
 LabTalk Forum
 select specific rows for calculation ??
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

DanielHenry

2 Posts

Posted - 06/16/2020 :  3:19:11 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. 2016G
Operating System: Windows 10

I like to perform simple calculation on data in a column, but use only selected rows.
If I use the Command Window I can do:
col(C)=90-col(B)omegle xender
which will perform the calculation on all rows.
I want the calculation on every 3rd row, i.e. 1st, 4th, 7th ... and the other data should be just copied as they are.
I tried:
for (ii =1; ii <=wks.maxrows; ii +=3)
{col(3)=90-col(2)[ii]}
but this gives a constant value in the 3rd column.
Can anyone help? Thanks.

Edited by - DanielHenry on 06/16/2020 10:59:34 PM

nick_n

Finland
125 Posts

Posted - 06/16/2020 :  4:22:23 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,
Try to modify:
col(3)[ii]=90-col(2)[ii];
Regards,

Nikolay
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