Course Content
Matlab Basics
Matlab Basics
1. Basic Syntax and Coding with a Text Editor
5. Recursion and Matrix Multiplication
Recursive ProgrammingUnderstanding Matrices and Matrix MultiplicationApplying Matrix Multiplication: Transforming Vectors and Coordinate SystemsApplying Matrix Multiplication: Solving Systems of EquationsApplying Matrix Multiplication: Derivatives and IntegralsCareer Prospects for a MATLAB Programmer
The Sortrows and Find Functions
Sorting data and finding specific entries is fundamental in many applications and programming. Matlab makes this easy to perform these tasks using complex criteria.
Task
-
Create your own snippets for the sort and find functions, and any other details you like throughout the entire section;
-
Rewrite your nuclear data analysis program (chapter 1) by using the find function, instead of a for loop, to identify which rows in the original data set correspond to unique plant locations.
The result will look very similar to your medical analysis program (chapter 2):
- Only one for loop will be needed. It will iterate over all the plant locations and calculate the final results for each (this was the second for loop in the original program);
- In each iteration of this for loop, you'll use find instead of logical indexing within the loop to identify rows and limit the data set to the location in question.
You're encouraged to modulize and design your programs however you like!
Everything was clear?
Thanks for your feedback!
Section 3. Chapter 5