ENGR 132 exam 2

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

1/52

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 7:59 AM on 3/27/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

53 Terms

1
New cards

For loop

Execute a specific number of times

2
New cards

While loop

Executes until a specific condition is met

3
New cards

Example of while loop

While k<=5

k=k+1

End

4
New cards

For loop example

For m=[ 4 -1 0]

X=2*m

Y=m+5

End

5
New cards

User defined function

MATLAB program created by the user, saved as a function file, and can be used like a built in function when in the current folder

6
New cards

UDF syntax

function [output1,output2,...] = function_name (Input1,input2,...)

7
New cards

complex loop

Uses combination of for loops, while loops

8
New cards

MATLAB Order of Operations

Parentheses

Exponentiation

Negation

Mult/divi

Add/sub

9
New cards

log(x)

Natural log

10
New cards

exist('')

Check if variable name is a built in function

11
New cards

log10(x)

log base 10

12
New cards

cos(x)

Cosine

13
New cards

cosd(x)

cosine of x in degrees

14
New cards

Variable naming rules

1. Variables should have a descriptive name that describes their purpose without being too long

2. Variable names cannot start with numbers or have spaces or special characters except for an underscore

3. Variables are case sensitive

15
New cards

Array

A collection of data whose elements are arranged in rows and/or cols, can be stored and manipulated

16
New cards

Scalar

One-element array

17
New cards

Vector

One-dimensional array

18
New cards

Matrix

Two-dimensional array(elements are arranged in rows and cols)

19
New cards

Row vectors

Created with brackets and commas but commas aren't necessary

20
New cards

Column vectors

Created with brackets and semicolons or .' To transpose

21
New cards

Transpose

.' Or transpose[ ]

22
New cards

Regularly spaced vectors

Start:step:end

23
New cards

0:10:50

0 10 20 30 40 50

24
New cards

Linearly spaced vector

Linspace(start,end,number of elements)

25
New cards

Linspace(0,55,6)

0 11 22 33 44 55

26
New cards

Never require a period character

-addition and subtraction

-multiplication of scalar and array

-division of array by scalar

27
New cards

Always require a period character

-multiplication, division, and exponentiation of arrays

-division of scalar by array

-exponentiation involving a scalar

28
New cards

Array indexing

Array elements are referenced by their row and column location

29
New cards

Array indexing syntax

Array(rows,cols)

30
New cards

: in array indexing

Includes all elements of that dimension

31
New cards

Linear indexing

Array elements are referenced by a single subscript

32
New cards

Down each column

How linear indexing works

33
New cards

Concatenating array

Join arrays together

34
New cards

Side by side concatenation

User_data = [user1 user2 user3]

35
New cards

Stacked concatenation

User_data = [user1; user2; user3]

36
New cards

vertcat

Built in function that concatenates arrays vertically

37
New cards

horzcat

Butler in function that concatenates horizontally

38
New cards

Flowchart rectangle

process

39
New cards

Flowchart diamond

decision

40
New cards

flowchart parallelogram

input and output

41
New cards

Flowchart 2 rectangles

Predefined process

42
New cards

Plotting in matlab

Plot(x,y,linespec)

43
New cards

Plot professional format

Grid on

X label

Y label

Title

Legend

44
New cards

sgtitle('')

Subplot title

45
New cards

axis ([xmin xmax ymin ymax]);

Set axis limits

46
New cards

fprintf function

Displays output or text

47
New cards

\n

new line

48
New cards

%s

String format character

49
New cards

%f

Decimal point

50
New cards

find

Discovers linear index location of all NONzero elements

51
New cards

AND (&)

Which is evaluated first and(&) or or(|)

52
New cards

Between in matlab

x >= A & x<= B

53
New cards

==

Equal to

Explore top notes

Explore top flashcards

flashcards
bio 3
25
Updated 1165d ago
0.0(0)
flashcards
AP US History Chapter 1 Test
108
Updated 904d ago
0.0(0)
flashcards
scythe vocab test 2
50
Updated 1078d ago
0.0(0)
flashcards
Business AS level
266
Updated 1084d ago
0.0(0)
flashcards
Protein Synthesis
48
Updated 1148d ago
0.0(0)
flashcards
bio 3
25
Updated 1165d ago
0.0(0)
flashcards
AP US History Chapter 1 Test
108
Updated 904d ago
0.0(0)
flashcards
scythe vocab test 2
50
Updated 1078d ago
0.0(0)
flashcards
Business AS level
266
Updated 1084d ago
0.0(0)
flashcards
Protein Synthesis
48
Updated 1148d ago
0.0(0)