MAE 08 Lecture Notes - Lecture 16: Linear System, Coefficient Matrix, Matlab
Document Summary
Combined use of for/while loops with if/switch statements. Break statement terminates execution of while or for loop. Write a script saving. m to do the following: From day 2 and on, i save twice as much as the previous day. Display the day, the saving amount of the day and the total for each day until i have . When used in nested loops, break only terminates the inner loop. Continue statement skips the rest of the actions in a for or while loop and begin the next iteration. In nested loops, continue skips remaining statements only in the body of the loop in which it occurs. In matlab, it can be done by a*b: advantages: fast, efficient, and convenient, matlab built-in functions do not provide all answers. There still need loops and conditional statements: recognize what and when to replace code with built in functions. Solve the following system of linear equations: ax = b.