Author |
Topic  |
|
imoada
31 Posts |
Posted - 08/23/2016 : 04:09:28 AM
|
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 |
|
imoada
31 Posts |
Posted - 08/23/2016 : 9:04:04 PM
|
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 |
 |
|
Hideo Fujii
USA
1582 Posts |
Posted - 08/30/2016 : 11:20:04 AM
|
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 |
 |
|
Hideo Fujii
USA
1582 Posts |
Posted - 08/31/2016 : 10:54:33 AM
|
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 |
 |
|
imoada
31 Posts |
Posted - 09/10/2016 : 3:06:38 PM
|
Hi Fujii,
Thanks for your answer. It looks good. I will try. You let me knew something new.
Thanks again.
hua
|
 |
|
Hideo Fujii
USA
1582 Posts |
Posted - 12/14/2016 : 10:51:10 AM
|
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 |
 |
|
|
Topic  |
|