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
 Excel like sum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

MFi

Czech Republic
1 Posts

Posted - 08/25/2017 :  07:47:45 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): OriginPro2017 SR1
Operating System: win10

Hi,

I´m new in Origin, so sorry for stupid question. I have a data from my experiment and I need to sum data in one row from selected columns. The problem is, that some of the data are like string (e.g."< 0.5"). I don´t need to add these values to the final sum (actually it is mistake), but what I need is to skip these data and sum only the "true" values from another columns in the "samle row".

Thanks for any advice.



Marek Fikrle

arstern

USA
237 Posts

Posted - 08/25/2017 :  10:52:55 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
One way to do this is to mask your data and then use statistics on rows to calculate the sum. When you mask data in your worksheet, the data will not be included the analysis.

You will first plot your data on a graph. With the graph activated select the Cluster Gadget.
Move the ROI box to select all data points you want to mask.
Select the mask tab in the Cluster Gadget dialog box. This will mask the data in the graph and in the worksheet.
Close the gadget dialog box and close the graph.

http://www.originlab.com/doc/Tutorials/Cluster-Gadget



Now select your rows in the worksheet and select Statistics -> Statistics on Rows -> Select Sum in Quantities. Select ok.

Aviel
OriginLab
Go to Top of Page

arstern

USA
237 Posts

Posted - 08/25/2017 :  5:46:12 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi,

You also if you do not want to use the cluster gadget, you can use the script below to mask all data points that are <0.5.

get col(A) -e numpoints;

loop(jj,1,wks.nCols)
{
for(ii=1; ii< numpoints; ii++)
{
if(Col($(jj))[$(ii)] < 0.5)
Col($(jj))<$(ii)> = 1;
else
Col($(jj))<$(ii)> = 0;
}
};

Aviel
OriginLab

Edited by - arstern on 08/25/2017 7:57:12 PM
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