Chapter 3 : Functions and Files Flashcards

1
Q

absolute value of x

A

abs(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

complex conjugate

A

conj(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

imaginary part of a complex number x

A

imag(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

real part of a complex number x

A

real(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

round to the nearest integer toward infinty

A

ceil(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

round to the nearest integer towards zero

A

fix(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

round to the nearest integer toward negative infinity

A

floor(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

round to the nearest integer

A

round(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

sign(x)

A

signum function:
+1 if x>0
0 if x=0
-1 if x<0

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

angle of a complex number

A

angle(x)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

cosh(x)

A

hyperbolic cosine

cosh x = (e^x + e^-x)/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

acosh(x)

A

inverse hyperbolic cosine

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

create a function (a .m file)

A

function [output variables] = function_name (input variables)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

the initial text for a function in the main program

A

[output] = file_name (input)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

how to upload an xls

A

A = xlsread(‘filename’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

imports all numeric data into the array A and text data into the cell array B

A

[A, B] = xlsread(‘filename)

17
Q

writes an xls file of name filename from array A

A

xlswrite(filename, A)