- Questo topic ha 5 risposte, 4 partecipanti ed è stato aggiornato l'ultima volta 10 anni, 5 mesi fa da .
-
Topic
-
Ciao a tutti,
scusate la domanda banale ma non ho trovato altri topic di questo tipo.
Come faccio a incollare codici di altri linguaggi senza che LaTeX li interpreti come codici suoi? esempio:
`”solmg27 =
NDSolve[{y'[t] + (Log[2]/hlmg27)*
y[t] – (sigmg27*10^(-3)*10^(-24))*(nneu*solangge)*(rhosi30*
avnum/QuantityMagnitude[
IsotopeData[{14, 30}, “AtomicMass”]])*
pop[datanuc[[k]]][t] == 0, y[0] == 0}, y, {t, 0, TMIS},
MaxSteps -> 10^6, AccuracyGoal -> 2, PrecisionGoal -> 1,
MaxStepSize -> 1];
popmg27[t_] := Extract[Evaluate[y[t] /. solmg27], {1}];
mg27dec =
Quiet[(Log[2]/hlmg27)*
NIntegrate[popmg27[t]*mfun[t], {t, 0, TMIS}, AccuracyGoal -> 2,
PrecisionGoal -> 1, MaxRecursion -> 10000]] + mg27dec;EVTOT =
Quiet[Round[
lambda[datanuc[[k]]]*
NIntegrate[pop[datanuc[[k]]][t], {t, 0, TMIS},
AccuracyGoal -> 2, PrecisionGoal -> 1, MaxRecursion -> 10000]]]
];
Print[Panel[Column[{
Panel[
Text[Style[Row[{“On beam product: “, datanuc[[k]]}], 16, Red,
Bold, Italic]]],
Text[
Style[Row[{“Symbol: “,
IsotopeData[datanuc[[k]], “FullSymbol”]}], 14, Black, Bold,
Italic]],
Text[
Style[Row[{“Cross section: “, data[[k, 3]], ” mbarn”}], 14,
Black, Bold, Italic]],
Text[
Style[Row[{“Total events produced: “, EVTOT}], 14, Black, Bold,
Italic]]
}, Alignment -> Left]]];(*Calcoliamo le popolazioni dei discendenti*)
tmp = Select[decaytab, #[[2]] == datanuc[[k]] && lambda[#[[3]]] > 0 &];
Do[
If[dfunc[tmp[[h, 3]], tmp[[h, 4]]] == True,
cnt = 0;
sol = Quiet[
NDSolve[{y'[t] + lambda[tmp[[h, 4]]]*y[t] –
tmp[[h, 5]]*lambda[tmp[[h, 3]]]*pop[tmp[[h, 3]]][t] == 0,
y[0] == 0}, y, {t, 0, TMIS}, MaxSteps -> 10^6,
AccuracyGoal -> 2, PrecisionGoal -> 1, MaxStepSize -> 1]];
pop[tmp[[h, 4]]][t_] := Extract[Evaluate[y[t] /. sol], {1}];
cnt = Quiet[
solangbgoge*lambda[tmp[[h, 3]]]*
NIntegrate[pop[tmp[[h, 3]]][t]*mfun[t], {t, 0, TMIS},
AccuracyGoal -> 2, PrecisionGoal -> 1, MaxRecursion -> 10000]];
famev = Join[famev, {{tmp[[h, 3]], tmp[[h, 4]], Round[cnt]}}];If[IsotopeData[tmp[[h, 3]], “AtomicNumber”] –
IsotopeData[tmp[[h, 4]], “AtomicNumber”] > 0,
anngamdec = Round[0.05*cnt] + anngamdec];
tev = Quiet[
solangbgoge*lambda[tmp[[h, 3]]]*
NIntegrate[pop[tmp[[h, 3]]][t], {t, 0, TMIS}, AccuracyGoal -> 2,
PrecisionGoal -> 1, MaxRecursion -> 10000]];
If[tev > 0,
ratio = 100*SetPrecision[(cnt/tev), 3],
ratio = 0];
Print[Panel[Column[{
Panel[Text[Style[Row[ “`
- Devi essere connesso per rispondere a questo topic.