Question: Kind of new to *Mathematica*. I am plotting a function that produces a bell-shaped curve in *Mathematica* within a `Manipulate` so that I can change its parameters easily. When I change the parameters of the function with the controls, I want the width of the bell-shaped curve at half its peak value recalculated.

How do I add this additional feature?

Answer: 
I just post this as a motivating toy example. There are many ways to do this and this approach may not suit.

```
fun[x_, p_] := Exp[-x^2/(2 p)]
tfun[step_, b_, p_] := Table[{j, fun[j, p]}, {j, -b, b, step}]
parf[s_, b_, p_] := Module[{data = tfun[s, b, p], pk, n, c},
  pk = FindPeaks[data[[All, 2]]][[1, 2]];
  n = Nearest[data[[All, 2]], pk/2, 2];
  c = Join @@ (Cases[data, {_, #}, All] & /@ n);
  ListPlot[data, Joined -> True, 
   Epilog -> {Line[c], 
     Text[Framed@Abs[c[[2, 1]] - c[[1, 1]]], {0, pk/2}, {0, -1}, 
      Background -> White]}]]

```

Visualizing:

```
  Manipulate[parf[0.001, b, p], {b, 2, 4}, {p, 0.5, 5}]

```

[![enter image description here](https://i.stack.imgur.com/GQRjq.gif)](https://i.stack.imgur.com/GQRjq.gif)
Solve for the width at half height as a function of $\sigma$, then just list it:

```
Manipulate[{
  Plot[PDF[NormalDistribution[0, σ], x], {x, -3, 3},
   PlotRange -> All], 
  N@Sqrt[2] σ Sqrt[Log[2]]},
  {σ, .1, 3}]

```