Community Tip - Your Friends List is a way to easily have access to the community members that you interact with the most! X
I have defined variables for phi and delta. I used these variables in a function which came to the correct result. I used them in another function right below and was given the wrong value. After substituting the variable with the actual value, I got the right answer. How do I define the variables correctly for more than a single function? FIle is attached. Please advise.
Solved! Go to Solution.
With a quadratic in phi that must be an empirical formula, therefore the coefficients assume phi is a numerical value, but with particular implicit units. In this case, degrees. You must therefore divide phi by that unit in the formula. If you do it this way, rather than manually entering the numeric values, the formula will work whether you define phi in degrees or radians.
In the term (0.8152-0.0545phi+0.001771*phi^2), you can not substitute in 34 for phi. That has to be converted to radians.
The function was based on regression analysis of phi and delta in degree. So I cannot convert them to radian. As you can see in the calcualtion below. Both phi and delta were input in degee. The calcualted value (i.e., 4.731) is the correct answer. I think the problem is related to how to define phi and delta as globle variables. Any other suggestions?
Oh, so those coefficients were from a regression that you performed elsewhere. Hmmm, in that case, the coefficients actually do contain some sort of units. Are you doing the regression in Excel. I would recommend one of two things:
1) Repeat the regression in radians. This basically eliminates the need for units (at least in terms of angles).
2) Do the regression in Mathcad!
With a quadratic in phi that must be an empirical formula, therefore the coefficients assume phi is a numerical value, but with particular implicit units. In this case, degrees. You must therefore divide phi by that unit in the formula. If you do it this way, rather than manually entering the numeric values, the formula will work whether you define phi in degrees or radians.
It is correct. Thanks.