Dear Users,
I really just started with Mathematica and I'm already stuck on something that looks pretty silly... I first do:
Manipulate[Plot[a (UnitStep[x] - UnitStep[x - b]), {x, -1, 10}, PlotStyle -> Thick], {a, 0.5, 1}, {b, 1, 8}]
And it works fine: I have a rectangular function with hight and width I can change. Now if I whant to define a function and then plot it I try with:
F[x_] := a (UnitStep[x] - UnitStep[x - b])
and then
Manipulate[Plot[F[x], {x, -1, 10}, PlotStyle -> Thick], {a, 0.5, 1}, {b, 1, 8}]
No lines appear in the plot. I tried to define the function with F[x_,a_,b_] and all kinds of combinations but nothing works. I think I am doing something conceptually wrong, can somebody help?
Thanks very much in advance,
L.