Question

In: Computer Science

Please solve all parts of the following question on MATLAB. 1. Penn State football travels to...

Please solve all parts of the following question on MATLAB.

1. Penn State football travels to Ohio State to play the Buckeyes on Nov 23, 2019. The official capacity of Ohio Stadium is 104,944. Let’s say that the stadium is filled at the beginning of the game, but every time Penn State scores a touchdown half of the fans leave. How many touchdowns does Penn State have to score until there is just one fan left in the stadium?

a. construct a two-column matrix in which one column is number of touchdowns and the other column is number of people in the stadium.

b. plot touchdown number vs. number of fans on linear axes. The satisfactory plot will include: a title, and labeled axes. Since you are plotting discrete data points, please plot them with a symbol and connect the symbols with a line. All fonts should be large enough to be legible. You may choose the aspect ratio of your plot and what kind of symbol and line style to use.

c. redo the plot, but this time with a logarithmic y axis.

Solutions

Expert Solution

clear
clc
fans=104944;
i=1;
touchdowns=0;
mat=[touchdowns,fans];
while mat(i,2)~=1
touchdowns=touchdowns+1;
mat=[mat;touchdowns,floor(mat(i,2)/2)];
i=i+1;
end
fprintf('Number of touchdowns scored: %d\n',mat(end,1))
plot(mat(:,1),mat(:,2),'-o')
xlabel('Touchdowns')
ylabel('Number of fans')
title('touchdown number vs. number of fans')
figure
semilogy(mat(:,1),mat(:,2),'-o')
xlabel('Touchdowns')
ylabel('Number of fans')
title('touchdown number vs. log(number of fans)')


Related Solutions

This Question has 6 parts a) to f): Answer all of them below: Penn State Marketing...
This Question has 6 parts a) to f): Answer all of them below: Penn State Marketing and Branding Office is interested in understanding more about alumni’s donation behavior, and the director Tom invited you to analyze a data set of 1,000 donors in the year 2016. There are several variables in the data Yi Amount of donations in dollars donor i made in the year 2016. MCi: The cost of all marketing communications in dollars donor i received in the...
Please solve all parts of the following question. Please show all work and all steps. 1a.)...
Please solve all parts of the following question. Please show all work and all steps. 1a.) Solve x' = x + 3y + 2t y' = x - y + t^2 1b.) Solve x' + ty = -1 y' + x' = 2 1c.) Solve x' + y = 3t y' - tx' = 0
Please solve both parts of the following question. Please show all work and all steps clearly...
Please solve both parts of the following question. Please show all work and all steps clearly and type out the solutions. Please do not copy and paste solutions from the other question posted on chegg that answers these questions. instead, please write your own individual answers solving them differently than the answers posted before on chegg. solve these problems differently and provide new solutions. 1a.) Estimate the first eigenvalue of x" + (lambda)(e^t)(x)=0, x(0)=x(2)=0 for part 1a, the solution should...
Please answer all the parts of this question Please answer all the parts of this question...
Please answer all the parts of this question Please answer all the parts of this question Question: a) Where is the flow accelerating in the control volume? b) Will the pressure be greater or less than hydrostatic in a region of accelerating flow? c) Is the hydrostatic estimate of force on the gate; larger, smaller, or the same, as that obtained from the Momentum Equation? Explain. d) Where does the change in flow momentum go in this control volume? Explain.
Please solve all parts Consider the following IVP y′ = 2t − y + 1, y(0)...
Please solve all parts Consider the following IVP y′ = 2t − y + 1, y(0) = 1. Find an approximation of y(1) using (a) the Euler’s method with N = 4, (b) the Euler’s method with N = 8, (c) the improved Euler’s method with N = 4, (d) the improved Euler’s method with N = 8. Solve the IVP, find y(1), and compare the accuracy |y(1)−yN | of the approximations.
Do in c++ programming languages Question 1: Solve the complete Question with all parts and subparts....
Do in c++ programming languages Question 1: Solve the complete Question with all parts and subparts. a) What do you understand by the term DATA TYPE? b) Is it possible to replace for loop with a while loop. Justify your answer with reasoning and example. c) Draw a flow chart for Do-While loop for controlled/uncontrolled infinite loop iterations. d) Write down a function prototype that takes an array and its length as an argument and also return the same array...
Please answer all parts of the following question. Please show all work and all steps. 1a.)...
Please answer all parts of the following question. Please show all work and all steps. 1a.) Solve the initial value problem W((t^2) + 1, f(t)) = 1, f(0) = 1 1b.) Let x1 and x2 be two solutions of x''+ ((x')/(t)) + q(t)x = 0, t > 0, where q(t) is a continuous function. Given that W(6)=7, find W(7) 1c.) Show that any solution of x''+ 5x' + 6x = 0 tends to zero as t approaches positive infinity. 1d.)...
Question 1 Problem 2.64 Use MATLAB to solve for and plot the response of the following...
Question 1 Problem 2.64 Use MATLAB to solve for and plot the response of the following models for 0≤t ≤1.5, where the input is f (t) =5t and the initial conditions are zero: 3¨ x +21˙ x +30x = f (t) A)  Use math (analytically) to find the response of the models given in Problem 2.64 of your book. Show all assumptions and all steps of your derivation. (Turn in the calculations.) B) Use MATLAB to solve the same problem 2.64...
Research question: In the population of all Penn State students, are more than 80% enrolled full-time?...
Research question: In the population of all Penn State students, are more than 80% enrolled full-time? In this question set you will be using StatKey to conduct randomization tests for a single proportion. These data are not built in to StatKey, so you will need to “Edit data” to enter in the sample counts. Please show screenshots and work. B. Using the five steps from the online notes, conduct a randomization test given that 350 students in a sample of...
define a matlab question and solve with matlab codes (rlc circuts)
define a matlab question and solve with matlab codes (rlc circuts)
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT