Lecture 1
Lecture 1
Programming in Matlab
Lecture-1: Introduction
What is MATLAB?
Current Folder-
Saved files can be
accessed
Array Creation
a = [1 2 3 4]
a = [1 2 3; 4 5 6; 7 8 10]
a=
1 2 3
4 5 6
7 8 10
Matrices
z = zeros(5,1)
z=
0
0
0
0
0
0.8147
rand(5,1) rand(1,5) 0.9058
0.1270
ans =
0.9134
0.6324
0.0975 0.2785 0.5469 0.9575
0.9649