Or login with:
| doublePDF( | double | x | |
| int | n | )[inline] |

#include <codecogs/statistics/distributions/continuous/angle/pdf.h> #include <iostream> #include <iomanip> #define PRECISION 17 int main() { std::cout << "The values of the Angle PDF with n = 3 and"; std::cout << std::endl; std::cout << "x = {0, 0.2, 0.4, ..., 1.8, 2} are" << std::endl; std::cout << std::endl; for (double x = 0; x < 2.1; x += 0.2) { std::cout << std::setprecision(2); std::cout << "x = " << std::setw(3) << x << " : "; std::cout << std::setprecision(PRECISION); std::cout << Stats::Dists::Continuous::Angle::PDF(x, 3); std::cout << std::endl; } std::cout << std::endl; std::cout << "The mean of the Angle distribution is equal to"; std::cout << std::endl; std::cout << Stats::Dists::Continuous::Angle::mean; std::cout << std::endl; return 0; }Output:
The values of the Angle PDF with n = 3 and x = {0, 0.2, 0.4, ..., 1.8, 2} are x = 0 : 0 x = 0.2 : 0.099334665397530608 x = 0.4 : 0.19470917115432523 x = 0.6 : 0.28232123669751769 x = 0.8 : 0.35867804544976134 x = 1 : 0.4207354924039482 x = 1.2 : 0.46601954298361309 x = 1.4 : 0.49272486499422996 x = 1.6 : 0.49978680152075255 x = 1.8 : 0.48692381543909757 x = 2 : 0.45464871341284085 The mean of the Angle distribution is equal to 1.5707963267948966
| x | the argument of the PDF |
| n | the spatial dimension (must be at least 2) |
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
You must login to leave a messge