07-30-2009 12:47 PM
Hello everyone,
I have a problem with statistics and respectively histogram generation from a set of data
Below you can see how my data channels look like.
In DIAdem VIEW I have ->
<All Channels>
Name |Ch1 Dev1|Ch2 Dev1|Ch3 Dev1|Ch1 Dev2|Ch2 Dev2|Ch3 Dev2|Ch1 Dev3|Ch2 Dev3|Ch3 Dev3|
Length |3 | 3 |3 |3 |3 |3 |3 |3 |3 |
Unit | V | V | V | V | V | V | V | V | V |
Channel contents
1 | 1.52 | 1.51 | 1.53 | 1.52 | 1.55 | 1.51 | 1.50 | 1.53 | 1.55 |
2 | 1.62 | 1.61 | 1.63 | 1.62 | 1.65 | 1.60 | 1.62 | 1.67 | 1.65 |
3 | 1.52 | 1.51 | 1.53 | 1.52 | 1.55 | 1.51 | 1.50 | 1.53 | 1.55 |
What I need is to create a histogram for a given row ->in this case number 2
It this straight forward or should I make some adjustments before that?
I hope my question is clear and is easy to follow.
Thanks in advance to anyone who can propose a working solution.
Solved! Go to Solution.
07-31-2009 04:07 AM
Hi,
in the histogram generation function in Diadem Analysis you can choose how many classes you need.
The other settings can be left to automatic. Then you get 2 result channels SampleCount and ClassMean. Class Mean
are the classes and SampleCount is how many values are in every class.
In my case I choosed 5 classes and the result diagram is attached. You can see that most values are in class 1.62
07-31-2009 05:19 AM
Hi , thanks for the fast reply.
When I start the Histogram generation from DIAdem analysis, the first thing I see as a problem is that I can choose only one
channel, under "Channels to be classified:".It is a major one, because the row I want to analyse is consisting of single values ,
spun over 9 channels. I've checked your solution, but it doesn't work for me so far.I can generate histogram for a single channel
without problems , but the values are spread in more channels.
07-31-2009 06:30 AM
07-31-2009 07:09 AM
DianaS wrote:
In this case I suggest to combine the 9 channels to one.
Regards
DianaS
Hi DianaS,
I tryed copying but I didn't manage to copy single values - instead I copy all the channels with all values which is not what I want. Is there a way to copy a row in DIAdem view and convert it to column(channel)? excel can do that I really doubt that DIAdem can't.
07-31-2009 07:49 AM
Hi
you can do this in a scipt.
Clear the dataportal, load the attached .tdm file and run the following script:
Dim i
Call ChnAlloc("Result", 3, 1,DataTypeFloat64,"Numeric")
for i=1 to 3
CHD(i,"Result") = CHD(1,i)
Next
Then all the single values from the 3 channels will be copied to the result channel.
07-31-2009 08:57 AM
Hi DianaS,
thanks a lot, that really solves the problem!
Have a nice day and a sunny weekend.
PS:What if I want only even or odd values to be picked up ?
07-31-2009 09:34 AM
This will work for odd numbers:
Dim i
Dim a
a=1
Call ChnAlloc("Result", 3, 1,DataTypeFloat64,"Numeric")
for i=1 to 3
if CHD(1,i)mod 2 <> 0 then
CHD(a,"Result") = CHD(1,i)
a=a+1
end if
Next
And this for even numbers:
Dim i
Dim a
a=1
Call ChnAlloc("Result", 3, 1,DataTypeFloat64,"Numeric")
for i=1 to 3
if CHD(1,i)mod 2 = 0 then
CHD(a,"Result") = CHD(1,i)
a=a+1
end if
Next