MATLAB Exam Review: Arrays, Functions, Logic, and Branching

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/10

flashcard set

Earn XP

Description and Tags

Practice vocabulary flashcards covering MATLAB arrays, indexing, function calling, rounding errors, built-in functions, logical operators, and branching test cases based on the exam review lightning round.

Last updated 4:30 PM on 10/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

11 Terms

1
New cards

Index

The location of a number in an array.

2
New cards

Element

The value of a number in an array.

3
New cards

Calling a Function

Writing a line of code to use a function. This always involves using the function's name to access the function code, and usually requires providing inputs and declaring output variables.

4
New cards

Array Information Types

The three kinds of information contained in an array: values (elements), locations (index), and orientation (i.e., vertical or horizontal).

5
New cards

Rounding Error

An error that occurs when the result of a calculation is so big that it exceeds the maximum possible value of a data system (e.g., rounding to inf\text{inf} in the double system, or adding 100100 and 200200 in an 8 bit8\text{ bit} integer data type to result in 255255, the maximum possible value in that data type).

6
New cards

Built-in max Function

A built-in MATLAB function that returns the maximum value in an array and the index where it is located; for the array [3,4,−4,5,1,−4,−2,1,5,5][3, 4, -4, 5, 1, -4, -2, 1, 5, 5], it returns [5,4][5, 4].

7
New cards

Built-in min Function

A built-in MATLAB function that returns the minimum value in an array and the index where it is located; for the array [3,4,−4,5,1,−4,−2,1,5,5][3, 4, -4, 5, 1, -4, -2, 1, 5, 5], it returns [−4,3][-4, 3].

8
New cards

Built-in length Function

A built-in MATLAB function that returns the number of elements in an array; for the array [3,4,−4,5,1,−4,−2,1,5,5][3, 4, -4, 5, 1, -4, -2, 1, 5, 5], it returns [10][10].

9
New cards

mod Function

A built-in function used to project numbers into a modular system—such as mapping all angles into the range of 00 through 359359—to handle inputs less than 00 or greater than 360360 (going backward into negative numbers yields higher values, where −1-1 is 359359).

10
New cards

Logical OR Operator (||)

A logical operator that evaluates whether at least one condition is true; in conditional branching, it can replace multiple separate branch conditions that yield the same output value.

11
New cards

Boundary Test Cases

Specific input cases evaluated directly at branch transition points (such as r1=pitch(0)r_1 = \text{pitch}(0), r2=pitch(90)r_2 = \text{pitch}(90), r3=pitch(180)r_3 = \text{pitch}(180), r4=pitch(270)r_4 = \text{pitch}(270), and r5=pitch(360)r_5 = \text{pitch}(360)) to verify that conditional statements behave correctly across all defined regions.