This preview shows page 1. Sign up to view the full content.
Unformatted text preview: shown in the screen shot, that call the mySolver function to nd zero for both f ( x ) = x 21 , with initial guess x = 2 and g ( t ) = t 33 t 22 t, with initial guess t =2 . Notice there is two ways to call a function, one way is to dene all arguments before calling the function, another is to dene some arguments and call the function with concrete values for the undened 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 function f ( x ) at a given number x and step size h > 0 using the forward dierence 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
 Dr.Han

Click to edit the document details