CS 1112 Chapter Notes - Chapter 1.1: Semicolon, Inverse Trigonometric Functions

45 views2 pages

Document Summary

Variables and assignment: a value is assigned to a variable using the equals operator (=) Variables can be used inside of fprintf statements: Example fprintf("the area of the pyramid is: %6. 3f \n", area); %6. 3f is placed where the value of the variable is going to be displayed. F specifies that the variable is a double (number with a decimal) 6 is the number of spaces allotted for the display of the variable. 3 is the number of decimal places displayed. More than one variable can be used. Errors are present in every calculation since models are 100% accurate and there is some round off error present in constants and calculations run by the computer. Mathematical constants and functions: pi is a constant in matlab, sqrt(insert number here) is used to find the square root, log(insert number here) is used to find the natural logarithm of a number.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents