When cars bum one gallon of gasoline. 19 4 pounds of CO_2 (carbon dioxide) is pr
ID: 3817087 • Letter: W
Question
When cars bum one gallon of gasoline. 19 4 pounds of CO_2 (carbon dioxide) is produced Suppose you have a group of cars that have the following fuel efficiencies (miles per gallon) 117 mpg, 42 mpg, 38 mpg, 33 3 mpg, 31 mpg. 28 mpg, 23 mpg and 18 mpg Create a row vector containing the fuel efficiencies Use the appropriate array operations to calculate the amount of CO: produced for each car if the cars were driven for the following distances given in miles 15000 miles for the car with 117 mpg, 13500 miles for the car with 42 mpg, 14000 miles for the car with 38 mpg, 11000 miles for the car with 33.3 mpg, 12500 miles for the car with 31 mpg, 8000 miles for the car with 28 mpg, 9500 miles for the car with 23 mpg, and 4000 miles with the car with 18 mpg The amounts of CO_2 should be stored in a row vector. The distance a free-falling object falls is given by the equation D = 1/2 gt^2 where D is the distance, g is the constant 9 8 meters per second, and t is time in seconds Using either the colon operator or the linespace function create a row vector for times from 0 to 3 minutes in 5 second intervals (increments) (The row vector should include 0 and 180). Using for each time.Explanation / Answer
1)efficiency=[117 42 38 33.3 31 28 23 18] #car vechicles efficiency
dist=[15000 13500 14000 11000 12500 8000 9500 4000] #distances they travel
gallon=[]
cdioxide=[]
for i=1:length(dist)
gallon(i)=dist(i)/efficiency(i) #gallon of gasoline required for traveling that distance
cdioxide(i)=19.4*gallon(i) #1 gallon of gasoline gives 19.4 ponds.so,
end
2)
time=linspace(0,180,37)
t1=(time.^2)
D=(0.5).*(9.8).*(t1)
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.