Computer Programming Exam 2 General Practice

0.0(0)
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

flashcard set

Earn XP

Description and Tags

Not MCQ just general concepts

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

break statements ____

get out of the loop it exists in

2
New cards

continue statements send you to ___

the beginning of the for/while loop

3
New cards

jump statements ___

transfer control to another part of the program

4
New cards

two types of jump statements in MATLAB:

break and continue

5
New cards

what is the difference between the built in functions ‘disp’ and ‘fprintf’?

disp: displays strings and one variable

fprintf: prints multiple structures and multiple variables, takes formatting code to display in specific ways

6
New cards

sprintf

formats data into string or character vectors

7
New cards

nargin returns the number of _____ given in the call to the currently executing function

function input arguments

8
New cards

true or false: a script m-file has no input arguments, no output arguments, no keyword when finished

true

9
New cards

True Errror =

True Value (calculation) - Approximate Value (numerical method)

10
New cards

Relative True Error (Δa) =

True Error / True Value

11
New cards

Approximate Error (Ea) =

Present Approximation - Previous Approximation

12
New cards

Relative Approximate Error (Δa) =

Approximate Error / Present Approximation OR (Present - Previous) / Present

13
New cards

examples of truncation error

pi, sqrt(2), maclaurin series

14
New cards

approximate riemann sum and approximation of derivates ____ sums

truncates