0% found this document useful (0 votes)
22 views3 pages

Week 4 Vector

The document contains a series of questions related to vector operations in MATLAB, including how to create and manipulate vectors, perform mathematical operations, and conduct statistical analysis. It covers topics such as vector addition, subtraction, dot and cross products, and generating random vectors. Additionally, it includes instructions for calculating mean, median, and standard deviation of a dataset.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views3 pages

Week 4 Vector

The document contains a series of questions related to vector operations in MATLAB, including how to create and manipulate vectors, perform mathematical operations, and conduct statistical analysis. It covers topics such as vector addition, subtraction, dot and cross products, and generating random vectors. Additionally, it includes instructions for calculating mean, median, and standard deviation of a dataset.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Week 4 Questions

1. How to write a vector in MATLAB. Example a= (1,2,3), b= (1,4,7) and c= (3,5,1).

2. Transpose vector b.

3. Vector calculation: a= (1,2,7,10) and b= (2,3,4, -10) for specific element.

4. Let’s do some math on vectors in MATLAB. a= (1,2,3,4,5) b= (5,6,7,8,9) c= (0,9,6,2,4)

a. a+b
b. a-b
c. b-a
d. a+b+c

5. Dot product and cross product. Same length is a must.

6. Sum of a vector.

7. Mean of a vector.
8. Minimum and maximum value of a vector

9. How to extract vectors and manipulate data. a= (1,2,3,4,5,6,7,8)

a. Increment by 1 starts from 1 and end by 8

b. Increment by 2 starts from 1 and end by 8

c. Extract from 2 to 5

10. Create new vector from existing. a= (1,2,3,4,5,6,7,8) and b= (2,4,6,8,10,12,14,16)

11. To multiply two vectors a= (1,2,3,4,5,6,7,8) and b= (2,4,6,8,10,12,14,16)

12. Some mathematical operation on vectors c= (2,4, -6,8, -10, -12,14,16)

a. Absolute vector

b. Log

c. Sqrt

d. power of 2

13. Build random vectors in MATLAB


14. Create random vector with no repeated numbers

15. Sorting numbers in vector (ascending and descending)

16. Statistical Analysis


Data = (10 23 89 43 87 64 12 49)
Find mean value, median and standard deviation

You might also like