A = z e r o s ( 3 , 4 ) {\textstyle A={\mathsf {zeros}}(3,4)} generates a 3 × 4 {\textstyle 3\times 4} matrix of zeros. A ( 3 , : ) = [ 1 2 3 4 ] {\textstyle A(3,:)=[1\,2\,3\,4]} changes the 3 {\textstyle 3} rd row of the matrix A {\textstyle A} to [ 1 2 3 4 ] {\textstyle [1\,2\,3\,4]} . The ’for’ loop assigns a value of 5 {\textstyle 5} to the entries represented by A ( 1 , 2 ) , A ( 2 , 3 ) {\textstyle A(1,2),A(2,3)} and A ( 3 , 4 ) {\textstyle A(3,4)} . Thus, the resulting matrix is [ 0 5 0 0 0 0 5 0 1 2 3 5 ] {\textstyle \color {blue}{\begin{bmatrix}0&5&0&0\\0&0&5&0\\1&2&3&5\\\end{bmatrix}}} .