Project

basic coding

1. displays the value of A assigned i.e, 1 2 3 4 5. This is 1*5 matrix.

2. displays the value of B assigned. ; symbol makes the arrangement column wise. this is 5*1 matrix.

3. no output, its an error since A & B\' are same 1*5 matrix, so matrix multiplication can\'t be operated.

4. matrix multiplication is succesfully operated & output is a 5*5 matix.

5. since A has been assigned 5 values i.e, 1 2 3 4 5. And the end value is 5. so, A(1:end) displays the same, values from 1 to 5.

6. A(1:2) displays 1 2, since end value is 2.

7. output error since B(1:2,3) symbolises values between 1 & 2 having gap 3 which is not possible here.

8. length of B is 5 so B(length(B)-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.