Topics in this lab
Mathlab Graphing Calculator is a scientific graphing calculator integrated with algebra and is an indispensable mathematical tool for students in elementary school to those in college or graduate school, or just anyone who needs more than what a basic calculator offers.
Back to index
- Basic Technical Mathematics, 11th Edition. Basic Technical Mathematics, 11th Edition. Many based on user feedback. The text is supported by an all-new online graphing calculator manual, accessible at point-of-use via short URLs. The MyLabâ„¢ Math course features hundreds of new algorithmic exercises, tutorial videos, and PowerPoint slides.
- The App provides both 2D and 3D workspaces to create graphs. The default graph window is 2D. To graph an equation in 3D (space figure), tap the 3D button in the top right next to the options button.Tap it again to go back to a 2D graph workspace.
Introduction
In this lab, we will explore the features of Matlab that allow you to domany of the simple tasks that you might have previously done on ascientific calculator.
For Parts II and III of this lab, use the following links.
For Parts II and III of this lab, use the following links.
Back to the top
Guide to lab exercises
Here is the color coding for the exercises you will find on this page. Help on a topic is shown ingreen as
Numerical input is shown inblue and the output is shown inwhite as
Matlab keywords such as help, sin, sqrt, and manyother reserved words will also be shown in white.
Metro c5 8 series controlled temperature holding cabinet. Analyzer Metro Device Unlock For Sale FarmMetro C5 9 Series Controlled Humidity Heated Holding. Metro c5 3 series user manual. Metro c5 8 series controlled.
And if the output of a command is too long to print here, we will use
Back to the top
Getting help in Matlab
The most useful topics for Lab 1 arebelow. Try these out at the command prompt by typinghelp followed by a topic.
for help on elementary arithmetic operations and associatedsymbols,
For help on changing the default formatting behavior,
You can also access help by using the doccommand.
The output will be the help document in a new window.
Back to the top
Basic data types in Matlab
For scientific computing, we deal almost exclusively with floating pointnumbers, represented in Matlab as type double. In Matlab, the double is the default, and assumed for all numericdata, unless otherwise specified.
Before continuing, we will set the formatting. More on this below.
Before continuing, we will set the formatting. More on this below.
We can enter numbers at the Matlab prompt as single numbers
or as a comma separated list of values
All values above are of type double. The last two values are writtenusing scientific notation. The first two values appear to be integervalues, but Matlab does not distinguish between integer and doublevalues, unless we specifically tell it to. So even the first two valuesare stored as doubles. To those of you who are more familiar withstrongly typed languages, Matlab's way of representing all numeric datain the same way may seem rather crude. But it means that we don't haveto worry type conversions. For example, the values 1/3 and 1.0/3.0 are exactlythe same. In compiled languages such as C, C++ or Fortran, the value of1/3 would be truncated to the nearest integer,which is 0 in this case.
The other data type that we willencounter frequently is the string type. For example,
The other data type that we willencounter frequently is the string type. For example,
are all examples of string, or character, dataypes. Strings are used inprinting output, for example. Note the use of the single quotes ' ' rather than double quotes '.
Back to the top
Introduction to arithmetic operators
Matlab has all of the familar arithmetic operators: addition, subtraction,multiplication, division and exponentiation. Type each of the following expressions at theMatlab prompt and hit enter :
Division
and subtraction,
Back to the top
Using parenthesis
By using parentheses, we can form complex arithmetic expressions.Note that all parentheses must be matched or you will get anerror. Also, note that the expected order of operations is followed.
We forgot a matching parenthesis when entering the continuedfraction above. Using the up-arrow on the keyboard, we can easily recover thecommand, add the missing parenthesis at the end of the expression,and re-enter the command to get the correct answer.
We can actually compute exactly what this continued fraction shouldbe. Substracting the exact result from our original expression, weshould expect to get zero :
Due to limited precision in the computer (we'll talk about thismore later), we don't get exactly 0, but a number very close to 0.
Back to the top
Formatting output
One of the big differences between scientific computing and otherbranches of computer science is that scientific computing deals withfloating point numbers to a much greater extent. One consequence ofthis is that the number of significant digits that appear in a resultthat we print out if very important. You may have noticed that fornon-integer results that you obtained above, you have only seen fourdigits of precision printed after the decimal place. We might like tosee the additional digits that Matlab is storing. To change Matlab'sdefault behavior, use the format statement.
We can return to the default shortened format by using theshort format option.
Ti 85 Graphing Calculator Manual
You can specify exponential notational with a trailing 'e' for either thelong or short versions of the formatstatement.
Note of things to come : If you are familiar with the C/C++print function 'printf' you might find the equivalent Matlabfunction fprintf a more flexible way toformat output.
We will be discussing this function in more detail in subsequent labs
Back to the top
Mathlab Calc
Elementary functions and predefined constants
Matlab has a large suite of elementary functions, includingthe exponential function, the logarithm, and all trigonometricfunctions.
To get help on these functions, you can use the elfun helpoptions.
To get help on these functions, you can use the elfun helpoptions.
The trigonometric functions include the six standard functionscos, sin,tan, sec,csc, and cot.
In addition, you can find allof the inverse trigonometric functions acos,asin, atan.asec, acsc,and acot.
Hyperbolic trigonometric functions cosh,sinh, tanh,acosh, asinh,atanh and so on are also available.
Before starting with these elementary functions, however, it ishelpful to look at an important named constant available inMatlab. This is the number pi.
In addition, you can find allof the inverse trigonometric functions acos,asin, atan.asec, acsc,and acot.
Hyperbolic trigonometric functions cosh,sinh, tanh,acosh, asinh,atanh and so on are also available.
Before starting with these elementary functions, however, it ishelpful to look at an important named constant available inMatlab. This is the number pi.
This is obviously the value of pi, to 16 digits.
You can expect Matlab to behave in the same way as yourcalculator when using these elementary functions. Below are some examples
You can expect Matlab to behave in the same way as yourcalculator when using these elementary functions. Below are some examples
Why is that last number so big?
It can be useful to use Matlab to verify trigonometric identities thatare easy to forget.
It can be useful to use Matlab to verify trigonometric identities thatare easy to forget.
does not give the expected result of 0. The first expressionappears to verify the (correct) cosine addition formula. Try this outwith a few other values to convince yourself.
Exponential and logarithmic functions also behave as expected :
Note that the log is the logarithm basee whereas log10is the logarithm base 10.
You may be wondering if e is another named constant in Matlab. Itis not, but it is easy to obtain by
We have already seen how we can raise one number to a power. Wecan of course use this to evaluate the square root of a number, or thecube root of a number. For example,
Hp pavilion dv6000 user manual pdf 2 8. The square root is used so often that it has its own special function.
Back to the top Manual philips respironics system one.
Lab exercises
Evaluate the following expressions and compare to the true solutions (seelink below).- $17 + 3/11 + frac{1}{4 - 2^5}$
- $(4.34 + 5.61)^{8.1}$
- $log(1/e)$
- $sqrt{frac{pi}{cos(1) + sin(1)}}$
- $left[log_{10}(sin(4.3) - tan(1.1) + 5)right]^{3.1^e}$
- $5 + frac{1}{3 + frac{1}{4 + frac{1}{12}}}$
- $cosh(pi) - frac{e^{pi} + e^{-pi}}{2}$
- $displaystyle{sum_{k=0}^{4} 7^{-k}}$
- $2^{{3}^{4^{{5}^6}}}$
- $sin(2 + 3i) - frac{e^{i(2 + 3i)} - e^{-i(2 + 3i)}}{2i}, qquad mbox{where $i= sqrt{-1}$} $
Back to the top
Get the code
Do you want to try the above code fragments on your own?Download the Matlab script that produces this page here.(lab_1.m)
Published with MATLAB® 8.2