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
 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Histogram

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
tinkusch Posted - 10/07/2003 : 10:06:42 AM
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

2   L A T E S T    R E P L I E S    (Newest First)
tinkusch Posted - 10/16/2003 : 11:10:10 AM
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

greg Posted - 10/15/2003 : 12:21:47 PM
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.


The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000