1 / 9

Mathcad Function & Program Examples

Mathcad Function & Program Examples. Ch E 111 David A. Rockstraw, Ph.D., P.E. New Mexico State University Chemical Engineering Department.

kaili
Download Presentation

Mathcad Function & Program Examples

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. MathcadFunction & Program Examples Ch E 111 David A. Rockstraw, Ph.D., P.E. New Mexico State UniversityChemical Engineering Department

  2. Define a Mathcad function CylinderArea(D,L) that requires the diameter (D) and length (L) of a cylinder as arguments, then calculates the surface area of a cylinder, and returns a vector that contains the area of the ends, the area of the lateral side, and the total surface area. Function: CylinderArea(D,L)

  3. FunctionCylinderArea(D,L)

  4. Write a function in Mathcad that is called using the statement Pythagorean(a,b), where a and b represent the legs of a right triangle. The function should return a three-element vector, where the first vector is the length of the hypotenuse, and the next two elements are the acute angles of the triangle in units of degrees. Function: Pythagorean(a,b)

  5. Function: Pythagorean(a,b)

  6. In you deposit P dollars at an annual interest rate of i compounded monthly, each month interest in the amount P  (i/12) is deposited into your account, providing a new principle of P + P  (i/12). Write a program that takes as inputs the principle (P), the annual interest rate (i), the number of compounding periods per year (f), and the number of years over which the principle is kept in the bank (n), and returns the total amount of money in the account at the end of that period. Program balance(P,n,f,i)

  7. Program balance(P,n,f,i)

  8. fever(age,temp)

  9. fever(age,temp)

More Related