Search the WinSPC Knowledgebase |
Browse by Category |
|
|
|
How do I create an equation that calculates the range between three different variables? |
Thank you for rating this answer.
|
If you have three variables ("V1", "V2", and "V3"), you can create a fourth variable ("Range") to calculate the range between the subgroups plotted for the three variables. For every set of subgroups added to "V1", "V2", and "V3", a corresponding subgroup will be calculated for the "Range" variable.
You can use the following equation to calculate the maximum of the three subgroups and the minimum of the three subgroup, which then can be used to calculate the range. This equation would be placed in the "Range" variable's equation (on the 'Settings' tab in the variable properties). The equation below also demonstrates the use of the 'If'-'Then'-'Else' logic construct and the use of temporary variables ("MyMax", "MyMin").
Let MyMax = 0 Let MyMin = 0
If "V1".Mean > "V2".Mean Then MyMax = "V1".Mean Else MyMax = "V2".Mean End If
If MyMax < "V3".Mean Then MyMax = "V3".Mean End If
If "V1".Mean < "V2".Mean Then MyMin = "V1".Mean Else MyMin = "V2".Mean End If
If MyMin > "V3".Mean Then MyMin = "V3".Mean End If
Result = MyMax - MyMin
|
Attachments |
No attachments were found.
|
Visitor Comments |
No visitor comments posted. Post a comment
|