I want to plot a graph of a function in one command
y=Sin[a+bx+c]+d;
for the range of x=[0,10]
for the below set of values
1.a=1,b=1,c=1,d=1
2.a=1.5,b=1.5,c=1.5,d=1.5
3.a=2,b=2,c=2,d=2
Mathematica Stack Exchange is a question and answer site for users of Wolfram Mathematica. It only takes a minute to sign up.
Sign up to join this communityrules = Thread[{a, b, c, d} -> #] & /@ {1, 1.5, 2};
Plot[Evaluate[Sin[a + b x + c] + d /. rules], {x, 0, 10},
PlotLegends -> ToString /@ rules]
rule4 = Thread[{a, b, c, d} -> {1, 2, 4, 3}]
{a -> 1, b -> 2, c -> 4, d -> 3}
rulesb = Append[rules, rule4];
Plot[Evaluate[Sin[a + b x + c] + d /. rulesb], {x, 0, 10},
PlotLegends -> ToString /@ rulesb]
a=1,b=1.2,c=1.4,d=1.6
a=2,b=2.2,c=2.4,d=2.6
a=3,b=3.2,c=3.4,d=3.6
$\endgroup$
Mar 12, 2020 at 7:04