I am new to Mathematica and I am working on a code on which the final output depends on variables evaluated from the inputs A simplified example: (x,y) inputs ,(q,w) intermediate values, (z) output
x = Input["x"]
y = Input["y"]
q = 2 x
w = 3 y
z = 4 q + 5 w
f = 3 x + 4 y
This works just fine, but I want to manipulate the inputs so i tried
q = 2 x
w = 3 y
Manipulate[z = 4 q + 5 w, {x, 0, 10}, {y, 0, 10}]
the result for z is 8x+15y
that doesn't change with moving x and y sliders.. so i tried
Manipulate[q = 2 x, {x, 0, 10}]
Manipulate[w = 3 y, {y, 0, 10}]
z = 4 q + 5 w
f = 3 x + 4 y
which worked for z but did not work for f as apparently the values of x and y aren't stored
my questions are
1- how to set the values for x and y from manipulate ?
2- the value of z isn't evaluated when i move the sliders but i have to run the code again and the sliders are thus reset. How can i get the result of z instantaneously by moving the sliders of x and y.
Thanks alot.