20_pdfsam_2 - The w.d width specifiers are optional. If...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: The w.d width specifiers are optional. If they are left out, default values are used. Examples: >> fprintf(’The temperature is %f degrees F \n’, temp) The temperature is 78.000000 degrees F >> fprintf(’The temperature is %4.1f degrees F \n’, temp) The temperature is 78.0 degrees F It should be noted that fprintf only displays the real part of a complex number, which is an important data type to be discussed later in the course. 2.6 Accuracy and Precision Physical measurements cannot be assumed to be exact. Errors are likely to be present regardless of the precautions used when making the measurement. Quantities determined by analytical means are not always exact either. Often assumptions are made to arrive at an analytical expression that is then used to calculate a numerical value. The use of significant digits provides a method of expressing results and measurements that conveys how “good” these numbers are....
View Full Document

Ask a homework question - tutors are online