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
 Histogram
 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/07/2003 :  10:06:42 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Hi,
is someone able to explain me the proper use of the LabTalk function:
histogram(dataset, inc, min, max)
An example would be fine.
It seems not to work with my Origin v7.0273 on a WIN98 computer and the explanation in help is very sparse...
Is there any other LabTalk option for the creation of an histogram or a frequency count?
Thanks for any help, bye

Stefan

greg

USA
1380 Posts

Posted - 10/15/2003 :  12:21:47 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
The histogram function returns a dataset with 'bins' (the x ranges) defined by the inc, min and max arguments.

In use:
Data2_B = histogram(Data1_B,10,0,100);

would calculate a histogram of Data1_B from 0 to 100 with a bin size of 10, and the histogram values would be put in Data2_B. To plot the data, you need to understand how to set the X values. The X value bins for the example are:
0 .. <10
10.. <20
20.. <30
etc.
which are 'centered' on:
5
15
25
etc.
so we can use:
get data2_B -e end;
start=5;
loop(ii,1,end) {
data2_a[ii]=start;
start+=10; // The increment
}

The result of this should be the same as our Histogram statistical plot.

Go to Top of Page

tinkusch

Germany
94 Posts

Posted - 10/16/2003 :  11:10:10 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Greg,
thanks for your help, now it is clear.

There is obvioulsy no command in LabTalk to do frequency counts on datasets the same way as with the macro in the following menue:
Statistics
Descriptive Statistics
FrequencyCount..
???

That brings me to an other general question:
Are commands from the menue also accessible/usable in a LabTalk script?


bye & thanks
Stefan

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