ENCMP100 Lecture Notes - Lecture 3: Nan

30 views2 pages

Document Summary

Pi" can be used instead of typing 3. 14159, the letter "p" has to be lower case. Rand" generates a pseudo- random number in the interval [0,1] will generate numbers in the same sequence every time. Rng" (random number generator) can be used as rng(shuffle)" will shuffle all the pseudo- random numbers so that sequence is not the same anymore. Rng(default)" will restore rand to its default settings. Randi(10) will generate a random integer number between 0 to 10. Randn" will generate a number from the normal distribution table. Round" function will round off numbers generated to 1 sf. Adding ;" in round(pi;": using sin(angle*pi/180) will compute the angle in degrees and using sind(angle)" will compute the sin function in degrees. Sign(number)" will display 1, -1 and 0 for a result from positive, negative and zero numbers respectively. Log(number)" is equivalent to natural log while log10(number)" is equivalent to log base 10.

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