Matlab programming
1. A=[1,2,3,4,5] returns the output of a matrix A consisting of one row and 5 columns with elements 1,2,3,4,5.
2. A=[1;2;3;4;5] returns ouput of matrix B consisting of one column and 5 rows with elements 1,2,3,4,5
3.C= A*B\' returns an error because both A and B matrices are of the same size consisting of 1 row and 5 columns which cannot be multiplied mathematically
4.C=B*A yields a matrix of 5 x 5 size with elements of B being multiplied by that of A as per row column matrix multiplication rule
5.A(1:end) yeids a matrix A of size 1x 5 consisting of all its elements from 1 upto 5
6.A(1:2) gives output of matrix A consisting of 1 row and two columns consisting of elements 1 & 2
7. B(1:2,3) yeilds an error because the indice 3 is out of bounds of matrix B since B has only 1 column
8. B(length(B)-2) yeidls output of 3 because length of B returns no of elements in B and when subtracted with 2 gives an output 3