Professional Documents
Culture Documents
MATLAB Workshop - Part 1 PDF
MATLAB Workshop - Part 1 PDF
Kesarkar,
M. Tech. TFE,
tejaskesarkar.xlr8@gmail.com
+917208548978
MATLAB Layout
Command window (Enter commands directly, view output, give
inputs)
Workspace (Holds all the existing variables created by you while
running a program)
Initializing variables
v_name = XY will assign memory for a variable named
Variable_name and the value of XY will be stored at that location
d = zeros()
zeros function
Command window commands
clc : clears command window
switch expression
case value_1
.statements.
case value_2
.statements.
otherwise
.statements.
end
Using loops (for)
for i = start_value : step_value : end_value
statements to be repeated..
end
Note : Default step value is 1
Using
loops
while(condition)
(while)
..statements to be repeated..
end
Loop will be continuously executed until condition is proven to be false