Redo Calculation (redo)
Calculate and display values based on a mathematical expression with variable input. Customize result and chart display.
Redo Calculation
Purpose
The "Redo Calculation" function allows users to input a mathematical expression with a variable, specify a range of values for the variable, and then calculate the results for each value in the range.
Use Cases
- Calculate sine, cosine, or any other mathematical function for a range of values.
- Generate a chart to visualize the results.
How to Use
- Enter the mathematical expression in the provided field.
- Specify the variable to use in the expression.
- Set the start, stop, and step values for the variable range.
- Optionally, select the number of decimal places to round off the results.
- Click on the "Calculate" button to see the results.
Input Values
- Mathematical Expression: Enter the mathematical expression to evaluate.
- Variable: Specify the variable used in the expression.
- Start Value: The starting value for the variable range.
- Stop Value: The ending value for the variable range.
- Step Value: The increment value for the variable range.
- Round Off: Number of decimal places to round off the results.
Output Values
- Results: The calculated results for each value in the specified range.
- Chart: A visual representation of the results.
Any other Instruction
- Ensure the mathematical expression is correctly formatted.
- Review the results and chart for accuracy.
Steps of Calculation
- Determine the range of values for the variable based on the start, stop, and step values.
- Evaluate the mathematical expression for each value in the range.
- Round off the results to the specified number of decimal places.
- Generate a chart to display the results visually.
Technical Parameters
xpr, variable, variation_start, variation_stop, variation_step, step_round_off, result_columns, result_units, chart_columns, chart_units, show
Return Values
results, xvals
Example Expressions
You can use the following expressions to directly evaluate in a non-interactive manner using eva():
redo("sine('x deg')", variable='x', variation_start=0.0, variation_stop=360.0, variation_step=10.0, step_round_off=2)
redo("cosine('x rad')", variable='x', variation_start=0.0, variation_stop=2*3.14, variation_step=0.1, step_round_off=3)
Click on Help icon to open the help page on a separate window.