DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Statistics in Diadem

Solved!
Go to solution

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|

 


Number |1             | 2            |3            |4             |5             |6             |7            |8             |9             |

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. 

0 Kudos
Message 1 of 8
(5,149 Views)

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

Regards
DianaS
0 Kudos
Message 2 of 8
(5,129 Views)

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.

 

0 Kudos
Message 3 of 8
(5,125 Views)
In this case I suggest to combine the 9 channels to one.
Regards
DianaS
0 Kudos
Message 4 of 8
(5,113 Views)

 

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.

 

 

 

0 Kudos
Message 5 of 8
(5,103 Views)
Solution
Accepted by topic author fscommand

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.

Regards
DianaS
Message 6 of 8
(5,087 Views)

Hi DianaS,

 

thanks a lot, that really solves the problem!Smiley Happy

Have a nice day and a sunny weekend. 

 

PS:What if I want only even or odd values to be picked up ?

 

 

 

0 Kudos
Message 7 of 8
(5,079 Views)

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

 

Regards
DianaS
0 Kudos
Message 8 of 8
(5,072 Views)