For an equation of type y = ax + b
, we have two values for a
and two for b
, that is, we have four different equations.
We already have a code that returns the values of x
and y
for each equation separately. We want to know if there is a way to loop
return the respective values of each x
and y
when we change the values of "a" and "b". That is, how to find y1, y2, y3, y4, x1, x2, x3 e x4
(for each combination of a and b) without having to run the code four times.
obs: the program used is R