02-14-2013 08:14 AM
Hello there,
I'm trying to calculate the normal distribution for a channel in DIAdem, without much luck. I've seen the example at the location below but I don't understand it. Does anybody have a simple/commented example that you wouldn't mind sharing please?
http://forums.ni.com/t5/DIAdem/DIAdem-2010-Advanced-Edition/td-p/1622394
Thank you,
Martin
http://forums.ni.com/t5/DIAdem/DIAdem-2010-Advanced-Edition/td-p/1622394
02-14-2013 10:35 AM
This is what I have so far, I'd be pleased to hear any feedback.
Thank you,
Martin
'Create the histogram classes
ClassNo = 40
ClassBegin = -5
ClassEnd = 40
ClassWidth = 1.125
ClassRangeWidth = 45
ClassChn = "[1]/Noname"
Call ChnHistogram("/On Time","/ClassMean","/SampleCount","NoBeginEnd","absolute")
'Build the CDF:
formula = "Ch(""/Result"")= SND( (Ch(""/ClassMean"") - mean ) / stdev)"
symbols(1) = "mean"
symbols(2) = "stdev"
values(1) = Data.Root.ActiveChannelGroup.Channels("On Time").Properties("ResultStatArithMean").Value
values(2) = Data.Root.ActiveChannelGroup.Channels("On Time").Properties("ResultStatDeviation").Value
Call Calculate ( formula, symbols, values )
'Differentiate to get the PDF
Call ChnDifferentiate("/ClassMean","/Result","/DifferentiatedX","/DifferentiatedY")
02-15-2013 01:10 AM
Hi MartinMcD,
Are you looking for this:
Greetings
Walter
02-15-2013 05:49 AM
Great, thank you Walter.
All the best,
Martin