Hello everyone,
So I wrote the following code to plot a pdf and transmission line cascade model.
\[Lambda] = 0.7;
n = 2000;
x = 1;
(*Boral Tanner distribution*)
BTD[r_, x_, \[Lambda]_] := (x*\[Lambda] (r \[Lambda] )^(r - x - 1)) (E^(-r*\[Lambda] )/(r - x)!);
(*Where r is the total number of failure, \x is the initial number of failure, \[Lambda] is the mean propogation*)
BTDdist[x_, \[Lambda]_, n_] := Table[BTD[r, x, \[Lambda]], {r, 1, n}] // N
(* distribution of BTD omitting BTD=0*)
BTDdistdrop[x_, \[Lambda]_, n_] := Drop[Table[BTD[r, x, \[Lambda]], {r, 1, n}], 1] // N
(* BTD for r>1 conditioned on r not zero *)
BTDdistcond[x_, \[Lambda]_, n_] := BTDdistdrop[x, \[Lambda], n]/(1 - E^(-x))
Manipulate[
Column@{ListLogLogPlot[BTDdistcond[\[Lambda], \[Lambda], 2000], Joined -> True, PlotRange -> {All, {0.000001`, 1}}], ControlActive[\[Lambda], Monitor[For[i = 1, i <= 2, Pause[10]; i++], NestWhileList[nextstage[#, \[Lambda]] &, 1, # != 0 &]]]}, {{\[Lambda], .01, "Lamda"}, 0.01, 1}]
The program runs fine when I evaluate it but once I close the Mathematica program and reopen this code it gives me the following error. And to make the error go away I have to reevaluate it everytime. Any thoughts?
ListLogLogPlot::lpn: BTDdistcond[0.01,0.01,2000] is not a list of numbers or pairs of numbers. >>