Unformatted text preview: shown in the screen shot, that call the mySolver function to ﬁnd zero for both f ( x ) = x 2-1 , with initial guess x = 2 and g ( t ) = t 3-3 t 2-2 t, with initial guess t =-2 . Notice there is two ways to call a function, one way is to deﬁne all arguments before calling the function, another is to deﬁne some arguments and call the function with concrete values for the undeﬁned arguments. As in all programming language, Mathcad allows you to call one function from within another. For example, we could create a function called myDerivative which will compute derivative of a given func-tion f ( x ) at a given number x and step size h > 0 using the forward diﬀerence formula: f ( s ) ≈ f ( x + h )-f ( x ) h . The following screen shot shows the call of myDerivative inside mySolver , Figure 2. Call another function...
View Full Document
- Spring '11
- Derivative, ASCII, Regular expression, Add Line button