Variables & Arithmetic Flashcards

1
Q

Clear command window

A

clc

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

Clear variables in workspace

A

clearvars

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

Assigning values to variables

A

Variable = value

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

How do we see all variables and their values?

A

Whos

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

How do we get strings?

A

Using quotation marks

w = “string”

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

What do we use for not showing results in command windows?

A

Use semicolon for not showing the output of a line.

x = 10 + 9 ;

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

What do we use for assigning multiple things in one line?

A

Use commas for using several variables in one line:

U = 20 , Me = 20

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

How do we run programs quickly?

A

Ctrl + Enter

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

How do we add comments?

A

Using percentage sign

% This is a comment

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