I'm new to Mathematica from R, since R is not quite good at dealing with the following problem. Say, i want to solve the function a x - 10 = 0. Each time I change the value of a, say, from 1 to 10 by 1, I get x as output.
Take a =2, i learnt the command
a=2 Solve[a * x - 10 ==0, x] Then i got x value. However, i have to manually change a=3, a=4, a=5... which is annoying.
I went online and found the following ways. Either
Manipulate[{a, Solve[a*x - 10 == 0, x]}, {a, 1, 5, 1}] or
Solve[#*x - 10 == 0, x] & /@ Range[1, 5, 1] However, the output is like
{{{x -> 10}}, {{x -> 5}}, {{x -> 10/3}}, {{x -> 5/2}}, {{x -> 2}}} which i don't know how to save it as a csv for further use in R. I want it to look like
a x 1 10 2 5 3 10/3 4 5/2 5 2 Any suggestions? thanks in advance
