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
 frequency counts and histograms with LabTalk?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

tinkusch

Germany
94 Posts

Posted - 10/15/2003 :  02:24:58 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
how can I create a frequency count or a histogram with LabTalk?
To my surprise, the LabTalk function:
histogram(dataset, inc, min, max)
is not working at al with my Origin v7.0273 on a WIN98 computer.
Is there any other LabTalk option for the creation of an histogram or a frequency count?
Thanks for any (urgently needed) help,
bye

Stefan

Mike Buess

USA
3037 Posts

Posted - 10/15/2003 :  08:02:21 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Stefan,

The histogram function works fine in v7.0552 (SR4) on my old Win98SE laptop. How does it fail for you?

Mike Buess
Origin WebRing Member
Go to Top of Page

Thomas_Unger

Germany
8 Posts

Posted - 10/15/2003 :  08:07:11 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hallo Stefan,

The easiest way is you copy the internal histogram function in Origin.
Open the script window, select a column in your worksheet, press
Strg and Shift and select in the Plot-menue under "statistical charts"
"histogram + probabilities".
Then the script shows up in your script window.
It basically should look like the following:
(I cannot test here at work because Origin7 (Pro) is still installed on my home PC)

i=200;// ergibt ca. 200 Klassen
limit -r sum.min sum.max i inc;
sum.min-=inc/2;sum.max+=inc/2;
w1=histogram(%C,inc,sum.min,sum.max);
win -T Data Count %CSHK;
col(2)=w1; del w1;
col(1)=data(sum.min+0.5*inc,sum.max+0.5*inc,inc);
col(3)=col(1);col(3)+=0,5*inc;
col(4)=sum(col(2));
set %H -e sum.n;
sum(col(4));
col(4)/=sum.max;
col(4)*=100;

Column 4 in the new worksheet "count" holds the cumulative percentage and column 1 the bins.
Hope this helps a bit.

Thomas
Go to Top of Page

tinkusch

Germany
94 Posts

Posted - 10/17/2003 :  03:06:42 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Greg and Thomas,
thanks for your help.
Now the histogram function works also on my computer.
(There was a misunderstanding of the proper use of it and from my point of view the comment in origin-help should be improved.)

Thomas:
I did not know that trick before, thanks!

bye

Stefan


[/quote]

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