Mathematica Plotting Solve Results

Remove["Global`*"] a = 0; For[z = 0, z < 3, z++, Sol[a] = x /. Solve[z^2 + x == 10, x]; a = a + 1;] 

I am new to the mathematica so I'm experimenting with it.Answer of the problem changes at every loop so I stored them inside an array. I can see the numeric results using Do[Print[Sol[a]], {a, 0, 2}]; but how can I plot the results I tried using Plot[Sol[[a]], {a, 0, 2}] but it didn't work.

1

1 Answer

Remove["Global`*"] func = z^2 + x == 10; sol = Solve[func, x]; Plot[x /. sol, {z, 0, 3}] 

enter image description here

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like