# Compensate for the different values between 0 and 1 in this equation

I want a work program to compensate for the different values between 0 and 1 in this equation and show results

Subscript[R, 1] Subscript[R, 2] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 11] /. Subscript[R, 1] :> 0.95 /.
Subscript[R, 2] :> 0.9 /. Subscript[R, 3] :> 0.85
/.  Subscript[R, 5] :> 0.75 /. Subscript[R, 6] :> 0.7 /.Subscript[R, 11] :> 0.96


So I interpreted like

But I want to change the values many times and show the results and thus be tired. Is there a suggestion better than that?

>

• Well, your images didn't show up correctly, but it doesn't matter anyway: please include your code in your post as typed text, in Mathematica syntax, properly formatted in code blocks, rather than as screenshot images. Mar 1 '17 at 22:30
• @march I've added code Mar 1 '17 at 22:46
• i guess the think you are looking for is Table ? reference.wolfram.com/language/ref/Table.html Mar 1 '17 at 22:58

Update: full code for a smaller example:

exp = Subscript[R, 1] Subscript[R, 2] Subscript[R, 5] Subscript[R,6] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 7] Subscript[R, 11];

variables = SortBy[Variables[exp], Last];
values = Array[Symbol["v" <> ToString[#]] &, Length@Variables[exp]];

Manipulate[Evaluate[exp /. Thread[variables -> values] // Style[#, 24] &],
Evaluate[## & @@({{#, .5, ToString[#2, TraditionalForm]}, 0, 1,
Appearance -> "Labeled"}& @@@Transpose[{values, variables}])], Alignment -> Center]


Original post:

variables = SortBy[Variables[expr], Last];
values = Array[Symbol["v" <> ToString[#]] &, Length@Variables[expr]];

Manipulate[Evaluate[expr /. Thread[variables -> values] // Style[#, 24] &],
Evaluate[## & @@( {{#, .5, ToString[#2, TraditionalForm]}, 0, 1,
Appearance -> "Labeled"} & @@@ Transpose[{values, variables}])]]


where expr is the expression in your posted code before the first ReplaceAll (/.):

expr = Subscript[R, 1] Subscript[R, 2] Subscript[R, 5] Subscript[R, 6] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6] Subscript[R, 11] - ...


Note: you need to evaluate the piece expr = ... before executing the Manipulate code.

Update: Copy/paste/execute the following before Manipulate:

expr = Subscript[R, 1] Subscript[R, 2] Subscript[R, 5] Subscript[R, 6] Subscript[R, 11]+
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 7] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 7] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 7] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 7] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5]
Subscript[R,6] Subscript[R, 7] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 7] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 8] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 4] Subscript[R, 8] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 4] Subscript[R,8] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 8] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 8] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 8] Subscript[R,11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 7] Subscript[R, 8] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4]
Subscript[R, 7] Subscript[R, 8] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3]
Subscript[R, 4] Subscript[R, 7] Subscript[R, 8] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 7] Subscript[R, 8] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 7] Subscript[R, 8] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3]
Subscript[R, 4] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 7] Subscript[R, 8] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 4] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3]
Subscript[R, 4] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 9] Subscript[R,  10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 7]
Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4] Subscript[R, 7]
Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 7] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 7] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4] Subscript[R, 5]
Subscript[R, 6] Subscript[R, 7] Subscript[R, 9]
Subscript[R,  10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 7]
Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 8] Subscript[R, 9]
Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 4] Subscript[R, 8] Subscript[R, 9]
Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 4] Subscript[R,  8]
Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 8] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 8] Subscript[R, 9]
Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 8] Subscript[R, 9]
Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 3] Subscript[R, 7] Subscript[R, 8]
Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4] Subscript[R, 7]
Subscript[R, 8] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 7] Subscript[R, 8] Subscript[R, 9]
Subscript[R,  10]  Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 3] Subscript[R, 5] Subscript[R, 6]
Subscript[R, 7] Subscript[R, 8] Subscript[R, 9]
Subscript[R, 10] Subscript[R, 11] -
Subscript[R, 1] Subscript[R, 2] Subscript[R, 4] Subscript[R,5]
Subscript[R, 6] Subscript[R, 7] Subscript[R, 8]
Subscript[R,  9] Subscript[R, 10] Subscript[R, 11] +
Subscript[R, 1] Subscript[R, 2] Subscript[R, 3] Subscript[R, 4]
Subscript[R, 5] Subscript[R, 6] Subscript[R, 7]
Subscript[R, 8] Subscript[R, 9] Subscript[R, 10] Subscript[R, 11];

Table[Replace[a b c d + a f d e, i, {2}], {i, #}] &@
Map[Thread[{a, b, c, d, e, f} -> #] &, {{0.95, 0.9, 0.3, 0.85, 0.1,
0.3}, {0.9, 0.8, 0.2, 0.65, 0.2, 0.1}}]

(* {0.24225, 0.1053} *)

• ....But I want the values changed many times Mar 1 '17 at 22:48
• @Emadkareem instead of posting the long code can you just use something simple like a small dummy example (such as in my code) and explain what you need? Mar 1 '17 at 22:50