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
 how to translate ∑
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

imoada

31 Posts

Posted - 08/23/2016 :  04:09:28 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
hello everyone:

I have no idea how to translate a formula including Σ to put it into the "f(x)=" cell in the row head. The picture of the formula is the following。

Anyone knows how to treat it?

Thanks.


Edited by - imoada on 08/23/2016 04:17:48 AM

Shirley_GZ

China
Posts

Posted - 08/23/2016 :  07:08:49 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
You can try the LabTalk Function "Sum" or "Total", see the simple examples below:



http://www.originlab.com/doc/LabTalk/ref/Total-func
http://www.originlab.com/doc/LabTalk/ref/Sum-func

Any problem, please feel free to let me know.

Thanks,
Shirley

Originlab Technical Service Team
Go to Top of Page

imoada

31 Posts

Posted - 08/23/2016 :  9:04:04 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Shirley

Thank you!

Your answer is simple and effective. But it looks like inconvenient for me. I am still waiting for another kind of solution such as labtalk to figure out my question.

Thanks again!

Hua
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 08/30/2016 :  11:20:04 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hua,

Just sugar-coated Shirley's approach, you can arrange the worksheet like following to automatize.



That is, using the Set Column Values tool, the third column calculates the individual rows inside the sigma,
and the fourth column simply sums up the third column using total() function to output to the first cell.

You can save this worksheet as an analysis template to reuse ("File> Save Workbook as Analysis Template" menu).

I hope this helps.

--Hideo Fujii
OriginLab
Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 08/31/2016 :  10:54:33 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Hua,

> waiting for another kind of solution such as labtalk

If you like to use a function in a command line or in a script, you can define the following LabTalk function:
function double chisq(dataset ds1, dataset ds2) {
  return total((ds1-ds2)^2/ds1);
}
To run it, you can do like:
chisq(col(A),col(B))=
chisq(col(A),col(B))=260.82614122859
To make this function global always usable in any project, follow the prcedure described at:
http://www.originlab.com/doc/LabTalk/guide/On-Starting-Origin#Defining_a_global_function

(Note: If you don't have [Startup] section in Origin.ini in your UFF, you have to add it.)

I hope this helps further.

--Hideo Fujii

Edited by - Hideo Fujii on 08/31/2016 10:58:17 AM
Go to Top of Page

imoada

31 Posts

Posted - 09/10/2016 :  3:06:38 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Fujii,

Thanks for your answer. It looks good. I will try. You let me knew something new.

Thanks again.

hua


Go to Top of Page

Hideo Fujii

USA
1582 Posts

Posted - 12/14/2016 :  10:51:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi hua and visitors to this thread,

The app for Chi-square test (for OriginPro 2017) has been published in our File Exchange site:
http://originlab.com/fileExchange/details.aspx?fid=339

Hope people find this tool useful.

--Hideo Fujii
OriginLab
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