Question: PART I: Do this in MATLAB Create a vector x containing all integers from 1 to 1 0 0 . Create a vector Y containing

PART I: Do this in MATLAB
Create a vector x containing all integers from 1 to 100. Create a vector Y containing the
following, in this order: 1,0.9,0.8,0.7dots0.1,0.
Create a vector U containing the first 25 elements of x. Create a vector V containing elements
50 through 75 of x. Create a vector W containing all the elements of x with an even index.
Create a 33 matrix with all ones. Create a 81 matrix with all zeros. Create a 52 matrix
with all elements equal to 0.37.
Create a 125 vector containing random elements distributed in the interval -0.5,0.5.
Given matrix M=[1,2,3;2,1,5;4,6,4;2,3,2], create another matrix N containing first two
rows and the first and the third column (i.e., row indexes i=1,2 and column indexes j=1,3)
from M.
Given vector A=[8,6,4] and integer number n=4 create matrix B containing n-times A(1)
in the first row, n-times A(2) in the second row, etc. (i.e.
B=,[8,8,8,8
6,6,6,6
4,4,4,4]
NOTE: You get full credit for this problem by attempting a solution. Just try it.
PART II: The sphere pictured to the right floats above
the surface of the water at a height that is proportional to
the mass of the person inside plus the mass of the sphere
material. The height, h, is related to the mass, m, by the
following equation:
m=w3(4r3+h3-3rh2)
where w is the density of water, 1000kgm3, and r is
the radius of the sphere, 2 m . The mass of the empty
sphere material is 12 kg .
A battery of tests were run before bringing this fun
device to market, including measuring the height of the
sphere above water while people of different weights
were inside. Download the height data from the Moodle
page. It is contained in a file called HW2_data.txt.
Using the "load" command, bring the h values into a matrix, and use the "size" command to
find out how many data values are present.
In a second matrix use the equation above to find the mass of each participant in the test.
Remember to subtract the mass of the empty sphere.
What is the mass of participant 14? And participant 24?
Find the average of the masses of participants 4,12,22, and 37.
PART I: Do this in MATLAB Create a vector x

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!