Mathcad Function - PowerPoint PPT Presentation

1 / 9
About This Presentation
Title:

Mathcad Function

Description:

Write a function in Mathcad that is called using the ... hypotenuse, and the next two elements are the acute angles of the triangle in units of degrees. ... – PowerPoint PPT presentation

Number of Views:148
Avg rating:3.0/5.0
Slides: 10
Provided by: davidro88
Category:

less

Transcript and Presenter's Notes

Title: Mathcad Function


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

2
Function CylinderArea(D,L)
  • 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.

3
FunctionCylinderArea(D,L)
4
Function Pythagorean(a,b)
  • 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.

5
Function Pythagorean(a,b)
6
Program balance(P,n,f,i)
  • 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.

7
Program balance(P,n,f,i)
8
fever(age,temp)
9
fever(age,temp)
Write a Comment
User Comments (0)
About PowerShow.com