You can assign each element of an array (e.g A) to a particular number. It follows the same convection of mapping elements in an array. E.g

A(1,1)=22 % assigns the first row, first column with the value of (22)
A(33,44)=55 % assigns the (33rd) row, (44th) column with the value (55) and anything in between (e.g A(2,2) will be assigned zero)
A(3,1:3)=[22 33 44] % Assigns the (3rd) row, 1st to 3rd columns with values of 22,33,44
A(row,column) % e.g if row=1 and column=3 then when you type this command then it will return the A(1,3) value of the array
A(2,:) = [1:0.4:10] % auto assigns 16 columns (number of values between 1 to 10 with spacing of 0.4)  to the (2nd) row of (A). therefore A(1,2)=1.4 and A(1,3)=1.8 etc
Advertisements