Week 5 Flashcards

1
Q

what does this mean? y = int16(10);

A

it is a 16-bit signed integer array

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

what is a signed type ?

A

Signed types enable you to work with negative integers as well as positive, but cannot represent as wide a range of numbers as the unsigned types because one bit is used to designate a positive or negative sign for the number. Source WIKI

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

what is the default floating-point number?

A

double precision

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

what can you do to verify that x is a floating-point number

A

Use the ‘isfloat’ command which will return a logical 1 or 0 false

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

how do you convert double precision to single precision data

A

x = single(assignment_name);

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

what function returns the attributes of variable x in a structure

A

the ‘whos’ function

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

How do you create an unsigned integer

A

uint8/16/32/64(variable)

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

How can you check if a variable is x number of bits and whether its uint or int

A

You ask they ‘whos’ they are?

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