# Question:Is latex(mymatrix,3) wrong in this case?

## Question:Is latex(mymatrix,3) wrong in this case?

Maple

Hello,

I do want to export as  LATEX input (displaying only 3 digits) my matrix "tableau".

After using

latex(  evalf(tableau),   3 )

I get too many decimals. What should I do to send as latex input only 3 decimals. My commands are below and my worksheet attached.

Thanks in advance for any help,

Jean-Jacques

restart:
`if` (1/2 <= w1+j*w2+((1/n)*(1-w1-w2))*k and
j*w2 +((1/n)*(1-w1-w2))*k < 1/2 ,
(1/((n+1)*(n+2)))*factorial(k+j)*factorial(n+1-j-k)/(factorial(k)*factorial(n-k)), 0),
k = 0 .. n), j = 0 .. 1) :
interface(displayprecision=3):
w1:=0.3:
w2:= 0.3:
alpha1:= 1-w1-w2:

phi11:= evalf(  (w1*(1-w1-2*w2))/(1-w1-w2)^2    );
phi21:= evalf(  (w2*(1-w2-2*w1))/(1-w1-w2)^2    );

phi12:= evalf(  (1/2-w2)^2/(1-w1-w2)^2          );
phi22:= evalf(  (1/2-w1)^2/(1-w1-w2)^2          );

0.1875000000
0.1875000000
0.2500000000
0.2500000000

interface(rtablesize=100,displayprecision=3):
tableau:= Matrix(  [ seq ( [n, evalf(alpha1/n) , evalf( f1(w1,w2,n)  ), evalf(  f1(w2,w1,n)) , evalf( 1-f1(w1,w2,n)-f1(w2,w1,n ))/n     ,evalf( 1-f1(w1,w2,n)-f1(w2,w1,n )), evalf( f1(w1,w2,n)/w1  ), evalf( f1(w2,w1,n)/w2  ),   evalf( 1-f1(w1,w2,n)-f1(w2,w1,n ))/alpha1     ],
n={1,2,3,4,5
,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,40,100,1000
}

)]):

`if`( 1/2 >= (w1+w2), print(phi11,phi21, 1-phi11-phi21),print(phi12,phi22, 1-phi12-phi22)):

latex(evalf(tableau,3));

XLATEXEVALEF.mw

﻿