[SOLVED] Lab MatLab
May 25th, 2022
I dont understand this Computer Science question and need help to study.
Struggling to find relevant content or pressed for time? – Don’t worry, we have a team of professionals to help you on
[SOLVED] Lab MatLab
Get a 15% Discount on this Paper
Lab 2: Vectors and Matrices
Tasks
- Using a built-in function, create a vector vec, which consists of 30 equally spaced points in the range from 2? to +?.
- Write an expression using linspace that will result in the same as 1: 0.5: 3
- Using the colon operator and the transpose operator, create a column vectormyvec that has the values -1 to 1 in steps of 0.5.
- Create a 3 x 5 matrix of random real numbers.Delete the third row.
- Create a three-dimensional matrix with dimensions 2 x 4 x 3 in which the first layer is all 0s, the second is all 1s and the third is all 5s.Use size to verify the dimensions.
- Create a 1 x 6 vector of random integers, each in the inclusive range from 1 to 20.Use built-in functions to find the minimum and maximum values in the vector.Also create a vector of cumulative sums using cumsum.
- A company is calibrating some measuring instrumentation and has measured the radius and height of one cylinder 8 separate times; they are in vector variables r and h.Find the volume from each trial, which is given by ?r2h.
r/cm |
5.499 |
5.498 |
5.5 |
5.5 |
5.52 |
5.51 |
5.5 |
5.18 |
h/cm |
11.1 |
11.12 |
11.09 |
11.11 |
11.11 |
11.11 |
11.08 |
11.11 |