Variables & Arithmetic Flashcards
1
Q
Clear command window
A
clc
2
Q
Clear variables in workspace
A
clearvars
3
Q
Assigning values to variables
A
Variable = value
4
Q
How do we see all variables and their values?
A
Whos
5
Q
How do we get strings?
A
Using quotation marks
w = “string”
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 ;
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
8
Q
How do we run programs quickly?
A
Ctrl + Enter
9
Q
How do we add comments?
A
Using percentage sign
% This is a comment