I want to implement a condition to affects the behavior of a plot made in a Manipulate
expression.
Suppose I have
Manipulate[Plot[Sin[nx],{x, 0, 5}],{n, 0, 6, 1}]
I want to change it so that for n
odd, I get
Manipulate[Plot[Sin[nx], {x, 0, 5}],{n, 0, 6, 1}]
and for n
even I get
Manipulate[Plot[Cos[nx], {x, 0, 5}], {n, 0, 6, 1}]`
But I want it in the same plot in the same Manipulate with n integer
How can I do this?
If / OddQ
and it isn x
notnx
. $\endgroup$