ENGR 101 Lecture Notes - Lecture 15: Matlab

17 views2 pages
24 Jan 2017
School
Department
Course

Document Summary

At this point, we have discussed sequence, selection, and basic iteration (the while construct) Recall: iteration is the repetitive execution of a group of instructions as long as some condition it met. There are two formal iteration constructs in matlab that we will cover: However, often the most efficient way to execute a loop in matlab is to vectorize the operation. Analyzing loops loops provide the means to reach the solution to a problem by successive approximation. Start off with an answer and as it goes on you get closer and closer to your final answer. Example : power x^y function z = power(x,y) %compute x to the y power z=1; n=0; while n

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