Re: Mathematica!

#64647
Up
0
Down
::


Ciao… non capisco perchè guit oggi fa i capricci,
è la terza volta che cerco di risponderti:
allora ho fatto come mi hai suggerito in quanto alla prof non vanno bene i risultati fatti con Excell poichè non si fida,
quindi per quanto riguarda la prima formula, tutto bene,
mentre la seconda fa i capricci, perchè:
la formula è (\[Rho]^n)/n!)*Exp[{-\[Rho]}], con n da 0 a 5, e mi esce il seguente errore (in mathematica sempre):
During evaluation of In[81]:= Thread::tdlen: Objects of unequal length in {1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.,1.} {{0.951229,0.904837,0.860708,0.818731,0.778801,0.740818,0.704688,0.67032,0.637628,0.606531,0.57695,0.548812,0.522046,0.496585,0.472367,0.449329,0.427415,0.40657,0.386741}} cannot be combined. >>

During evaluation of In[81]:= Thread::tdlen: Objects of unequal length in {0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95} {{0.951229,0.904837,0.860708,0.818731,0.778801,0.740818,0.704688,0.67032,0.637628,0.606531,0.57695,0.548812,0.522046,0.496585,0.472367,0.449329,0.427415,0.40657,0.386741}} cannot be combined. >>

During evaluation of In[81]:= Thread::tdlen: Objects of unequal length in {0.00125,0.005,0.01125,0.02,0.03125,0.045,0.06125,0.08,0.10125,0.125,0.15125,0.18,0.21125,0.245,0.28125,0.32,0.36125,0.405,0.45125} {{0.951229,0.904837,0.860708,0.818731,0.778801,0.740818,0.704688,0.67032,0.637628,0.606531,0.57695,0.548812,0.522046,0.496585,0.472367,0.449329,0.427415,0.40657,0.386741}} cannot be combined. >>

During evaluation of In[81]:= General::stop: Further output of Thread::tdlen will be suppressed during this calculation. >>

During evaluation of In[81]:= Transpose::nmtx: The first two levels of the one-dimensional list {{0.05,0.1,0.15,0.2,0.25,0.3,0.35,0.4,0.45,0.5,0.55,0.6,0.65,0.7,0.75,0.8,0.85,0.9,0.95},<<5>>,{{0.951229,0.904837,0.860708,0.818731,0.778801,0.740818,0.704688,0.67032,0.637628,0.606531,0.57695,0.548812,0.522046,0.496585,0.472367,0.449329,0.427415,0.40657,0.386741}} {2.60417*10^-9,8.33333*10^-8,6.32812*10^-7,2.66667*10^-6,8.13802*10^-6,0.00002025,<<7>>,0.00140058,0.00197754,0.00273067,0.00369754,0.00492075,0.00644817}} cannot be transposed. >>

Out[83]//TableForm= \!\(\*
TagBox[
RowBox[{“Transpose”, “[“,
RowBox[{“{“,
RowBox[{
RowBox[{“{“,
RowBox[{“0.05`”, “,”, “0.1`”, “,”, “0.15`”, “,”, “0.2`”, “,”, “0.25`”,
“,”, “0.3`”, “,”, “0.35`”, “,”, “0.4`”, “,”, “0.45`”, “,”,
“0.5`”, “,”, “0.55`”, “,”, “0.6`”, “,”, “0.65`”, “,”, “0.7`”,
“,”, “0.75`”, “,”, “0.8`”, “,”, “0.85`”, “,”, “0.9`”, “,”,
“0.95`”}], “}”}], “,”,
RowBox[{
RowBox[{“{“,
RowBox[{“{“,
RowBox[{“0.951229424500714`”, “,”, “0.9048374180359595`”, “,”,
“0.8607079764250578`”, “,”, “0.8187307530779818`”, “,”,
“0.7788007830714049`”, “,”, “0.7408182206817179`”, “,”,
“0.7046880897187134`”, “,”, “0.6703200460356393`”, “,”,
“0.6376281516217733`”, “,”, “0.6065306597126334`”, “,”,
“0.5769498103804866`”, “,”, “0.5488116360940265`”, “,”,
“0.522045776761016`”, “,”, “0.4965853037914095`”, “,”,
“0.4723665527410147`”, “,”, “0.44932896411722156`”, “,”,
“0.4274149319487267`”, “,”, “0.4065696597405991`”, “,”,
“0.38674102345450123`”}], “}”}], “}”}], ” “,
RowBox[{“{“,
RowBox[{“1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”, “,”,
“1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”, “,”,
“1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”, “,”,
“1.`”, “,”, “1.`”, “,”, “1.`”, “,”, “1.`”}], “}”}]}], “,”,
RowBox[{
RowBox[{“{“,
RowBox[{“{“,
RowBox[{“0.951229424500714`”, “,”, “0.9048374180359595`”, “,”,
“0.8607079764250578`”, “,”, “0.8187307530779818`”, “,”,
“0.7788007830714049`”, “,”, “0.7408182206817179`”, “,”,
“0.7046880897187134`”, “,”, “0.6703200460356393`”, “,”,
“0.6376281516217733`”, “,”, “0.6065306597126334`”, “,”,
“0.5769498103804866`”, “,”, “0.5488116360940265`”, “,”,
“0.522045776761016`”, “,”, “0.4965853037914095`”, “,”,
“0.4723665527410147`”, “,”, “0.44932896411722156`”, “,”,
“0.4274149319487267`”, “,”, “0.4065696597405991`”, “,”,
“0.38674102345450123`”}], “}”}], “}”}], ” “,
RowBox[{“{“,
RowBox[{“0.05`”, “,”, “0.1`”, “,”, “0.15`”, “,”, “0.2`”, “,”, “0.25`”,
“,”, “0.3`”, “,”, “0.35`”, “,”, “0.4`”, “,”, “0.45`”, “,”,
“0.5`”, “,”, “0.55`”, “,”, “0.6`”, “,”, “0.65`”, “,”, “0.7`”,
“,”, “0.75`”, “,”, “0.8`”, “,”, “0.85`”, “,”, “0.9`”, “,”,
“0.95`”}], “}”}]}], “,”,
RowBox[{
RowBox[{“{“,
RowBox[{“{“,
RowBox[{“0.951229424500714`”, “,”, “0.9048374180359595`”, “,”,
“0.8607079764250578`”, “,”, “0.8187307530779818`”, “,”,
“0.7788007830714049`”, “,”, “0.7408182206817179`”, “,”,
“0.7046880897187134`”, “,”, “0.6703200460356393`”, “,”,
“0.6376281516217733`”, “,”, “0.6065306597126334`”, “,”,
“0.5769498103804866`”, “,”, “0.5488116360940265`”, “,”,
“0.522045776761016`”, “,”, “0.4965853037914095`”, “,”,
“0.4723665527410147`”, “,”, “0.44932896411722156`”, “,”,
“0.4274149319487267`”, “,”, “0.4065696597405991`”, “,”,
“0.38674102345450123`”}], “}”}], “}”}], ” “,
RowBox[{“{“,
RowBox[{“0.0012500000000000002`”, “,”, “0.005000000000000001`”, “,”,
“0.01125`”, “,”, “0.020000000000000004`”, “,”, “0.03125`”,
“,”, “0.045`”, “,”, “0.06124999999999999`”, “,”,
“0.08000000000000002`”, “,”, “0.10125`”, “,”, “0.125`”, “,”,
“0.15125000000000002`”, “,”, “0.18`”, “,”,
“0.21125000000000002`”, “,”, “0.24499999999999997`”, “,”,
“0.28125`”, “,”, “0.32000000000000006`”, “,”,
“0.36124999999999996`”, “,”, “0.405`”, “,”, “0.45125`”}],
“}”}]}], “,”,
RowBox[{
RowBox[{“{“,
RowBox[{“{“,
RowBox[{“0.951229424500714`”, “,”, “0.9048374180359595`”, “,”,
“0.8607079764250578`”, “,”, “0.8187307530779818`”, “,”,
“0.7788007830714049`”, “,”, “0.7408182206817179`”, “,”,
“0.7046880897187134`”, “,”, “0.6703200460356393`”, “,”,
“0.6376281516217733`”, “,”, “0.6065306597126334`”, “,”,
“0.5769498103804866`”, “,”, “0.5488116360940265`”, “,”,
“0.522045776761016`”, “,”, “0.4965853037914095`”, “,”,
“0.4723665527410147`”, “,”, “0.44932896411722156`”, “,”,
“0.4274149319487267`”, “,”, “0.4065696597405991`”, “,”,
“0.38674102345450123`”}], “}”}], “}”}], ” “,
RowBox[{“{“,
RowBox[{“0.000020833333333333336`”, “,”, “0.0001666666666666667`”,
“,”, “0.0005625`”, “,”, “0.0013333333333333335`”, “,”,
“0.0026041666666666665`”, “,”, “0.0045`”, “,”,
“0.007145833333333331`”, “,”, “0.010666666666666668`”, “,”,
“0.015187500000000001`”, “,”, “0.020833333333333332`”, “,”,
“0.027729166666666673`”, “,”, “0.036`”, “,”,
“0.045770833333333344`”, “,”, “0.05716666666666665`”, “,”,
“0.0703125`”, “,”, “0.08533333333333334`”, “,”,
“0.10235416666666665`”, “,”, “0.12150000000000001`”, “,”,
“0.1428958333333333`”}], “}”}]}], “,”,
RowBox[{
RowBox[{“{“,
RowBox[{“{“,
RowBox[{“0.951229424500714`”, “,”, “0.9048374180359595`”, “,”,
“0.8607079764250578`”, “,”, “0.8187307530779818`”, “,”,
“0.7788007830714049`”, “,”, “0.7408182206817179`”, “,”,
“0.7046880897187134`”, “,”, “0.6703200460356393`”, “,”,
“0.6376281516217733`”, “,”, “0.6065306597126334`”, “,”,
“0.5769498103804866`”, “,”, “0.5488116360940265`”, “,”,
“0.522045776761016`”, “,”, “0.4965853037914095`”, “,”,
“0.4723665527410147`”, “,”, “0.44932896411722156`”, “,”,
“0.4274149319487267`”, “,”, “0.4065696597405991`”, “,”,
“0.38674102345450123`”}], “}”}], “}”}], ” “,
RowBox[{“{“,
RowBox[{“2.604166666666668`*^-7”, “,”, “4.1666666666666686`*^-6”, “,”,
“0.000021093749999999998`”, “,”, “0.0000666666666666667`”,
“,”, “0.00016276041666666666`”, “,”,
“0.00033749999999999996`”, “,”, “0.0006252604166666664`”,
“,”, “0.0010666666666666672`”, “,”, “0.0017085937500000003`”,
“,”, “0.0026041666666666665`”, “,”,
“0.0038127604166666674`”, “,”, “0.005399999999999999`”, “,”,
“0.007437760416666668`”, “,”, “0.010004166666666663`”, “,”,
“0.01318359375`”, “,”, “0.017066666666666674`”, “,”,
“0.02175026041666666`”, “,”, “0.027337500000000004`”, “,”,
“0.033937760416666664`”}], “}”}]}], “,”,
RowBox[{
RowBox[{“{“,
RowBox[{“{“,
RowBox[{“0.951229424500714`”, “,”, “0.9048374180359595`”, “,”,
“0.8607079764250578`”, “,”, “0.8187307530779818`”, “,”,
“0.7788007830714049`”, “,”, “0.7408182206817179`”, “,”,
“0.7046880897187134`”, “,”, “0.6703200460356393`”, “,”,
“0.6376281516217733`”, “,”, “0.6065306597126334`”, “,”,
“0.5769498103804866`”, “,”, “0.5488116360940265`”, “,”,
“0.522045776761016`”, “,”, “0.4965853037914095`”, “,”,
“0.4723665527410147`”, “,”, “0.44932896411722156`”, “,”,
“0.4274149319487267`”, “,”, “0.4065696597405991`”, “,”,
“0.38674102345450123`”}], “}”}], “}”}], ” “,
RowBox[{“{“,
RowBox[{“2.604166666666668`*^-9”, “,”, “8.333333333333338`*^-8”, “,”,
“6.328124999999999`*^-7”, “,”, “2.666666666666668`*^-6”, “,”,
“8.138020833333333`*^-6”, “,”, “0.000020249999999999998`”,
“,”, “0.00004376822916666665`”, “,”,
“0.00008533333333333338`”, “,”, “0.00015377343750000005`”,
“,”, “0.00026041666666666666`”, “,”,
“0.0004194036458333335`”, “,”, “0.0006479999999999999`”, “,”,
“0.0009669088541666669`”, “,”, “0.0014005833333333329`”,
“,”, “0.0019775390625`”, “,”, “0.002730666666666668`”, “,”,
“0.0036975442708333324`”, “,”, “0.0049207500000000015`”, “,”,
“0.0064481744791666665`”}], “}”}]}]}], “}”}], “]”}],
Function[BoxForm`e$,
TableForm[BoxForm`e$]]]\)

come procedere?
poi per quanto riguardano i dati copiati dal .tex da dopo il \begin{array}, per alcuni valori mi esce ad esempio
3.3049\times 10^{-6} e quindi mi da errore latex! questo \times sarebbe *, quindi 3.3049*10^-6? e come fare
in mathematica a far mettere automaticamente solo 5 cifre decimali? se no dovrei fare tutto manualmente io…

grazie in anticipo.
Marianna

Go to top