Tricky Facts Flashcards

0
Q

Indentation for numbers versus characters

A

> > var = 3
var =
3

> > var = ‘3’
var =
3

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

Default format is:
Format short
Format loose

A

Default type for integers is double

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

Shift a string of characters

A

> > char (‘abcd’ + 1)
ans =
bcde

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

> > disp(‘Hello’)
Hello

A

disp will automatically put prompt,&raquo_space;, on next line

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