The following example generates 100 random Rayleigh distributed values and then uses RayleighFit routine to extract used b parameter
var vec1: Vector; resB : double; CIb: TTwoElmReal; begin // first, generate 1000 randomly Rayleigh distributed // numbers with b=1.3 vec1.Size(1000); RandomRayleigh(1.3,vec1); // Now extract the r and it's 95% confidence intervals. RayleighFit(vec1,resb,CIb); end;
#include "StatRandom.hpp" #include "MtxExpr.hpp" #include "Statistics.hpp" void __fastcall Example(); { sVector vec1; // first, generate 1000 randomly Rayleigh distributed // numbers with b=1.3 vec1.Size(1000,false); RandomRayleigh(1.3,vec1); // Now extract the r and it's 95% confidence intervals. double resb; TTwoElmReal CIb; RayleighFit(vec1,resb,CIb,0.05); }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|