File:Student5map.png

From TORI
Jump to navigation Jump to search

Original file(1,706 × 1,690 pixels, file size: 154 KB, MIME type: image/png)


Complex map of the Student Distribution with 5 degrees of freedom:

\( u+\mathrm i v = \mathrm{Stident}_5(x+\mathrm i y) \)

C++ generator of curves

// Routines ado.cin and conto.cin and fac.cin should be loaded in order compile the code below

#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#define DB double
#define DO(x,y) for(x=0;x<y;x++)
//using namespace std;
#include<complex>
typedef std::complex<double> z_type;
#define Re(x) x.real()
#define Im(x) x.imag()
#define I z_type(0.,1.)
#include "conto.cin"
#include "fac.cin"

z_type Student(z_type n, z_type t){
z_type c,d,e;
c=fac((n-1.)/2.);
d=fac(.5*n-1.);
e=exp(-.5*(n+1.)*log(1.+t*t/n));
return e*c/(sqrt(M_PI*n)*d);
}

//z_type Gau(z_type z){ return exp(-.5*z*z)/sqrt(2*M_PI);} 

int main(){ int j,k,m,n; DB x1,x,y, p,q, t; z_type z,c,d, cu,cd;
int M=800,M1=M+1;
int N=800,N1=N+1;
DB X[M1],Y[N1];
DB *g, *f, *w; // w is working array.
g=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
f=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
w=(DB *)malloc((size_t)((M1*N1)*sizeof(DB)));
char v[M1*N1]; // v is working array
FILE *o;o=fopen("Student5ma.eps","w");  ado(o,802,802);
fprintf(o,"401 401 translate\n 100 100 scale\n");
fprintf(o,"1 setlinejoin 2 setlinecap\n");
DO(m,M1) X[m]=-4.+.01*(m-.5);
DO(n,N1) Y[n]=-4.+.01*(n-.5); 
for(m=-4;m<5;m++) {M(m,-5)L(m,5)}
for(n=-4;n<5;n++) {M(  -5,n)L(5,n)} fprintf(o,".006 W 0 0 0 RGB S\n");
DO(m,M1)DO(n,N1){      g[m*N1+n]=999;
                       f[m*N1+n]=999;}
DO(m,M1){x=X[m]; if(m/10*10==m) printf("x=%6.3f\n",x);
DO(n,N1){y=Y[n]; z=z_type(x,y);  
//c=zex(z);  
//c=1./(1.+z*z);
c=Student(5.,z);
//c=Gau(z);

p=Re(c); q=Im(c);
//        if(p>-19 && p<19 &&  fabs(q)>1.e-12 && fabs(p)>1.e-12) 
g[m*N1+n]=p;
//        if(p>-19 && p<19 &&  fabs(q)>1.e-12 && fabs(p)>1.e-12) 
f[m*N1+n]=q;
       }}
fprintf(o,"1 setlinejoin 1 setlinecap\n");  p=20.;q=.3;
for(m=-2;m<2;m++)for(n=1;n<10;n+=1)conto(o,f,w,v,X,Y,M,N,(m+.1*n),-q,q);fprintf(o,".007 W 0 .6 0 RGB S\n");
for(m=0;m<2;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N,-(m+.1*n),-q,q);fprintf(o,".007 W .9 0 0 RGB S\n");
for(m=0;m<2;m++) for(n=1;n<10;n+=1)conto(o,g,w,v,X,Y,M,N, (m+.1*n),-q,q);fprintf(o,".007 W 0 0 .9 RGB S\n");
for(m= 1;m<5;m++) conto(o,f,w,v,X,Y,M,N, (0.-m),-p,p);fprintf(o,".02 W .8 0 0 RGB S\n");
for(m= 1;m<5;m++) conto(o,f,w,v,X,Y,M,N, (0.+m),-p,p);fprintf(o,".02 W 0 0 .8 RGB S\n");
               conto(o,f,w,v,X,Y,M,N, (0.  ),-p,p); fprintf(o,".02 W .5 0 .5 RGB S\n");
for(m=-4;m<5;m++)conto(o,g,w,v,X,Y,M,N,(0.+m),-p,p);fprintf(o,".02 W 0 0 0 RGB S\n");
fprintf(o,"showpage\n");  fprintf(o,"%c%cTrailer\n",'%','%');
fclose(o);  free(f); free(g); free(w);
      system("epstopdf Student5ma.eps"); 
      system(    "open Student5ma.pdf"); //for macintosh
//      getchar(); system("killall Preview"); // For macintosh
}

Latex generator of label

% file Student5ma.eps should be generated with code above in order to latex the document below

\documentclass{standalone}
\usepackage{graphicx}
\usepackage{rotating}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\sx{2}{\begin{picture}(856,848)
\put(48,40){\includegraphics{Student5ma.eps}}

\put(458,414){\sx{3}{\rot{90}$v\!=\!0$\ero}}

\put(524,404){\sx{3}{\rot{90}$u\!=\!0.3$\ero}}
\put(568,404){\sx{3}{\rot{90}$u\!=\!0.2$\ero}}
\put(624,404){\sx{3}{\rot{90}$u\!=\!0.1$\ero}}

%\put(550,478){\sx{3}{\rot{29}$v\!=\!-\!0.1$\ero}}
\put(562,394){\sx{3}{\rot{-38}$v\!=\!0.1$\ero}}

\put(760,558){\sx{3}{\rot{9}$u\!=\!0$\ero}}
\put(164,434){\sx{3}{$v\!=\!0$}}
\put(764,434){\sx{3}{$v\!=\!0$}}
\put(756,314){\sx{3}{\rot{-10}$u\!=\!0$\ero}}

\put( 26,830){\sx{4}{$y$}}
\put( 24,730){\sx{4}{$3$}}
\put( 24,630){\sx{4}{$2$}}
\put( 24,530){\sx{4}{$1$}}
\put( 24,430){\sx{4}{$0$}}
\put(-4,330){\sx{4}{$-1$}}
\put(-4,230){\sx{4}{$-2$}}
\put(-4,130){\sx{4}{$-3$}}
\put(16,6){\sx{4}{$-4$}}
\put(116,6){\sx{4}{$-3$}}
\put(216,6){\sx{4}{$-2$}}
\put(316,6){\sx{4}{$-1$}}
\put(442,6){\sx{4}{$0$}}
\put(542,6){\sx{4}{$1$}}
\put(642,6){\sx{4}{$2$}}
\put(742,6){\sx{4}{$3$}}
\put(836,8){\sx{4}{$x$}}
\end{picture}}
\end{document}w09:10:42 ~/Sites/Student/TRY04>
w09:10:43 ~/Sites/Student/TRY04>
w09:10:43 ~/Sites/Student/TRY04>
w09:10:43 ~/Sites/Student/TRY04>
w09:10:43 ~/Sites/Student/TRY04>
w09:10:43 ~/Sites/Student/TRY04>
w09:10:44 ~/Sites/Student/TRY04>
w09:10:44 ~/Sites/Student/TRY04>cat Student5map.tex 
\documentclass{standalone}
\usepackage{graphicx}
\usepackage{rotating}
\newcommand \sx {\scalebox}
\newcommand \rot {\begin{rotate}}
\newcommand \ero {\end{rotate}}
\begin{document}
\sx{2}{\begin{picture}(856,848)
\put(48,40){\includegraphics{Student5ma.eps}}

\put(458,414){\sx{3}{\rot{90}$v\!=\!0$\ero}}

\put(524,404){\sx{3}{\rot{90}$u\!=\!0.3$\ero}}
\put(568,404){\sx{3}{\rot{90}$u\!=\!0.2$\ero}}
\put(624,404){\sx{3}{\rot{90}$u\!=\!0.1$\ero}}

%\put(550,478){\sx{3}{\rot{29}$v\!=\!-\!0.1$\ero}}
\put(562,394){\sx{3}{\rot{-38}$v\!=\!0.1$\ero}}

\put(760,558){\sx{3}{\rot{9}$u\!=\!0$\ero}}
\put(164,434){\sx{3}{$v\!=\!0$}}
\put(764,434){\sx{3}{$v\!=\!0$}}
\put(756,314){\sx{3}{\rot{-10}$u\!=\!0$\ero}}

\put( 26,830){\sx{4}{$y$}}
\put( 24,730){\sx{4}{$3$}}
\put( 24,630){\sx{4}{$2$}}
\put( 24,530){\sx{4}{$1$}}
\put( 24,430){\sx{4}{$0$}}
\put(-4,330){\sx{4}{$-1$}}
\put(-4,230){\sx{4}{$-2$}}
\put(-4,130){\sx{4}{$-3$}}
\put(16,6){\sx{4}{$-4$}}
\put(116,6){\sx{4}{$-3$}}
\put(216,6){\sx{4}{$-2$}}
\put(316,6){\sx{4}{$-1$}}
\put(442,6){\sx{4}{$0$}}
\put(542,6){\sx{4}{$1$}}
\put(642,6){\sx{4}{$2$}}
\put(742,6){\sx{4}{$3$}}
\put(836,8){\sx{4}{$x$}}
\end{picture}}

Notes

1. In routine «Student», number \( n \) of degrees of freedom of the Student Distribution has no need to be integer. It can be also complex.

2. The evaluation is supposed to return of order of 15 significant figures.

The detailed test should be appreciated.

Let us cover all functions used in the research

with the complex double implementations.

References

Keywords

«Factorial», «Student Distribution», «[[]]»,

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current09:16, 10 May 2024Thumbnail for version as of 09:16, 10 May 20241,706 × 1,690 (154 KB)T (talk | contribs)reduce number of lines
08:37, 9 May 2024Thumbnail for version as of 08:37, 9 May 20241,706 × 1,690 (157 KB)T (talk | contribs){{oq|Student5map.png|}} Complex map of the Student Distrinition with 5 degrees of freedom: \( u+\mathrm i v = \mathrm{Stident}_5(x+\mathrm i y) \) ==C++ generator of curves== // Routines ado.cin and conto.cin and fac.cin shou...

The following page uses this file:

Metadata