To avoid affecting lamda in other part of my notebook, I have wrapped code with Module. After wrapping, red colored font appeared.Could I know the reason?
Clear[n, \[Lambda], t];
Module[{\[Lambda] = 5},
Manipulate[
Plot[1 - Exp[-\[Lambda] t], {t, 0, 7}], {{n, 10}, 1, 100, 1}]]
With
instead ofModule
. $\endgroup$Clear[n, \[Lambda], t]; Manipulate[Module[{\[Lambda] = 5}, Plot[1 - Exp[-\[Lambda]* n * t], {t, 0, 7}] ], {{n, 10}, 1, 100, 1} , TrackedSymbols :> {n} ]
$\endgroup$Module[{a = 5}, Module[{a}, Exp[a*t]]]
and this is basically the same thing you did. It is just that Manipulate under the cover becomes dynamic module. $\endgroup$λ
another control variable in theManipulate
with its initial value set to5
. $\endgroup$