Uploaded by Duran Crutchfield

m313h1-1w23

advertisement
M313 W23
Intro Numerical Analysis – Homework §1.1
Page 1/1
Homework §1.1 – MATLAB Arithmetic, Environment, and Formats
In Exercises 1-10, use MATLAB to compute the given expression.
4
12
1. 75 − 3 ∙ 2 + 2
5+6� 3 �−22
7.
2 3
2. (75 − 3)2
� �
4
3 3∙6
3. 3
4
8. 1/0
4. 23
9. 0/0
5. (23 )4
10. 00
4(5)
3
2 − 7
6.
1−8
In Exercises 11-14, predict the output from MATLAB for the given input.
11. 2-5-7
13. 10/20/10
12. 2+3*5
14. 10/(20/10)
In Exercises 15-22, explain the purpose of the given MATLAB command/key.
15. clc
20. intmin
16. clear
21. realmax
22. realmin
17. ↑ (up arrow)
23. iskeyword
18. ans
24. quit or exit
19. intmax
25. Execute the following lines of code in MATLAB. Pick any text file name to substitute for
<filename>.
diary <filename>
10.356789
format short e
ans
format short eng
ans
format short
ans
diary off
10.356789
Explain the meaning of the format commands and the diary commands.
26. Use MATLAB to display the number 1.455 using the commands format rat, format
long, format bank, and format +.
27. Use the MALTAB command help <topic> to display help information. Try to
substitute any commands used in this homework for <topic>.
Download