Back to Search
Start Over
Loop Statements and Vectorizing Code
- Publication Year :
- 2019
- Publisher :
- Elsevier, 2019.
-
Abstract
- The chapter introduces the concepts of counted ( for ) and conditional ( while ) loops. Many common uses such as summing and counting are covered using the programming method. Nested loops are also introduced. Some more sophisticated uses of loops such as error-checking and combining loops and selection statements are also covered. Finally, vectorizing code, by using built-in functions and operators on vectors and matrices instead of looping through them, is demonstrated. Tips for writing efficient code are emphasized, and tools for analyzing code are introduced.
Details
- Database :
- OpenAIRE
- Accession number :
- edsair.doi.dedup.....3e934198e24d92c87efcf508aa8805e9
- Full Text :
- https://doi.org/10.1016/b978-0-12-815479-3.00005-2