A large TV screen of height H = 50 ft is placed on the side wall of a tall building. The height from the street to the bottom of the screen is h = 130 ft. The best view of the screen is when the viewing angle, \(\theta\text{,}\) is maximized. Use MATLAB to determine the distance x at which \(\theta\) is a maximum.
To do so, define a vector x with elements ranging from 30 to 300 with spacing of 0.5. Use this vector to calculate the corresponding values of \(\theta\text{.}\) Then use MATLAB’s built-in function max to find the value of x corresponding to the largest value of \(\theta\text{.}\)
Activity4.11.
Use MATLAB to show that the sum of the infinite series
converges to 1. Do this by computing the sum for upper bounds N=10, 20, 30, and 40.
Hint: Create a vector with elements from 1 through N first and then use this vector to create another one whose elements are \(\frac{1}{2^n}\text{,}\) for \(n=1,...,N\text{.}\) Then add up the components of this vector.