Project

Coding Basics

1) A is an row matrix, with size 1X5 and holds 1 2 3 4 5 numbers in the corresponding array indexes

2) Column matrix, with size 5x1

3) C= A*B\' is not possible, because matrix A hold 1X5 and matrix B holds 1X5 which is not acceptable for multiplication of matrix. But it can carry the element wise operator (dot product (A.*B\')).

4) C =B*A is possible, as no of columns in first matrix is equals to the no of rows in the second matrix and matrix multiplication is possible. And results in the new 5X5 matrix.

5) If index values uses \'end\' it will returns the index value corresponding to the last element of the array.

6)It returns values till index 2( Ans: 1 2) from matrix A.

7) B(1:2,3) is an error because matrix B is column matrix of 5X1. 3 represents the matrix column which is impossible.

Eg: If matrix B is size of 5X5, above command is valid and return values till end index of column 3.

8) length command -Gives the maximum length of array, B(length(B)-2)=3 (Length of the array B=5; 5-2 =3)

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.