ENGIN W7 Lecture Notes - Lecture 11: Matlab, Time Complexity, Binary Search Algorithm

155 views6 pages
12 Feb 2018
School
Department
Course
Professor

Document Summary

Introduction to computer science for scientist and engineers-engin7 lecture 11. Monte carlo methods use iteration to repeat the same calculation many times, with different (randomly sample) input values each time. Resulting output variable distributes reflect effects of input data uncertainties. Call rng(1) in the beginning of your code, so you get the same random numbers. Most computer-generated (e. g. matlab) random numbers are actually pseudo-random. Long list of pseudo-random numbers pre-programmed into matlab. Transformations from simple random quantities to all commands incorporating randomness. Before computers, there were books of random numbers! %get the current generator settings s=rng x=rand(1,5) %rand generates some values rng(s) 2/9/18 y=rnad(1,5) %generates the same values so x and y are equal. Figuring out how much disk space used. Keep cutting the number in half (is what you"re looking for greater than or less than) Assume mysum is initialized as 0. for j=1:m for i=1:n mysum=mysum+1; end end.

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