Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
ISE212 Engineering Computing: MATLAB Homework #2 Due: Monday >>> 3/02/2015 Spring_2015 Upload your assignments to the TA by going to Content in Blackboard: 1. A catenary is a uniform cable, fixed at its two ends, which supports its own weight (See sketch below). A catenary cable is attached at points P1 & P2. The attachment points are at a height h1 and h2 along an arbitrary y-axis. The x-y coordinates are arbitrary except that the y-axis must align with the down direction and the x-axis must have its zero point at an x-value corresponding to the lowest point of the catenary cable. The lowest point of the catenary cable is at a y-value of b. In the coordinate system described, the path of the catenary cable can be described as the following: y(x) = b cosh(x/b) Write an executable script file (m-file) that takes no input and returns the heights of the two attachment points: the y-coordinate of P1 and the y-coordinate of P2. In addition, create a plot of the catenary curve that the cable follows. Your plot must assume the following qualities: (Name your m-file>>> catenary15.m). grid on b = 32; P1_x = -40; P2_x = 110; plot Δ x = 0.10 Title: Catenary Curve >>> bold, italics, font size 20 x-axis label: X-axis >>> bold, font size 18 y-axis label: Y-axis >>> bold, font size 18 The user must be given the opportunity to label the locations of P1 and P2 with the text >>> attachment height. (Let the user known what is expected). 2. A metal plate of non-uniform material is located in the X-Y plane as indicated in the sketch below. The plate is heated at the (1,1) corner by a constant heat source. The temperature T, at any (x,y) point in the plate after enough time has passed for the plate to come to equilibrium after heating has started, can be described by: 2 T(x,y) = 92 e (– (x – 1) ) 2 e (– 4 (y – 1) ) Units for T are degrees Fahrenheit. Units for x and y are meters. Write an executable script file (m-file) that takes no inputs and returns one plot with a family of curves for T (values for y will be fixed at y = 0, ¼, ½, ¾ , 1.0) which gives a good picture of T(x,y) over the whole metal plate. (Name your m-file: heatplate15.m). Qualities of your plot should include: Each of the five curves/lines should have a different color. Provide a legend that explains line color to y-value with all plot lines unobstructed. Title: Temp vs Location for Heated Metal Plate >>> bold, italics, font size 16 x-axis label: X-axis (m) >>> bold, italics fontsize 18 y-axis label: Temp (deg F) >>> bold, fontsize 18 grid on 3. Most microphones designed for use on a stage are directional microphones, which are specifically built to enhance the signals received from the singer in the front of the microphone while suppressing the audience noise from behind the microphone. The gain of such a microphone varies as a function of angle according to the equation: Gain = 3g(1.3 + cosθ) Where g is a constant associated with a particular microphone, and θ is the angle from the axis of the microphone to the sound source. Assuming that g = 0.95 for a microphone, write an executable script file (name: microphone15.m) that takes no inputs and returns a polar plot of the gain of the microphone as a function of the direction of the sound source (plot using the color green). Be sure to include the title (in bold): Gain versus Angle θ. 4. MATLAB proves to be a very useful tool for plotting of WAVES. The parametric equation of wave is given as: A sin(2 π F T) Where A is Amplitude, F is Frequency in Hertz, T is Time in Seconds. Given: A=Amplitude= 98 T=Time= 0 to 0.75 Sec Questions: (Name your File as wave15.m) a) Create a 3 Hz Sine Wave lasting for 0.75 second b) Create a 6 Hz Sine Wave lasting for 0.75 second c) Then Plot the 3 Hz Sine Wave in a Top Panel, the 6 Hz Sine Wave in a Middle Panel and the Sum of these Sine Waves in a Bottom Panel. (Three sub-plots on one Page, stacked). Label the x-axis and the y-axis. Also, provide titles on all three subplots…. 5. Write an executable script file (m-file) that takes no inputs and returns a plot of the following function: y = xx Plot the function from 0 ≤ x ≤ 3.00 (values of x should be in 0.01 intervals). Be sure to label your axis and plot (title). (Name your m-file: powerx15.m). 6. Supply and demand is an economic model of price determination in a market. The model concludes that in a competitive market, the unit price for a particular good will vary until it settles at a point where the quantity demanded by consumers (at current price) will equal the quantity supplied by producers (at current price), resulting in an economic equilibrium of price and quantity. Supply and demand can each be represented by simple linear formulas relating the price per unit supplied (or demanded) and the quantity supplied (or demanded). The equilibrium price can be found by setting the two equations equal to one another for P, solving for Q to find the equilibrium quantity Q*, and then evaluating either the demand or supply equation with the value of Q* obtained to solve for the equilibrium price, P*. Assume the following formulas for the market for raincoats in Binghamton: Demand: P = 40 – 2Q Supply: P = 6 + 2Q where P is the price of a raincoat and Q is quantity of raincoats. Perform the following tasks. Name your Matlab script file (m-file) braincoats15.m. 1) Plot the demand and supply curves for the Binghamton raincoat market for values of Q from 0 to 15 (in increments of 1) on one graph using a different color for each curve and clearly labeling the axes. Include a legend and enable the grid for ease of viewing. 2) Model the market for Binghamton raincoats as a system of equations and solve for equilibrium quantity (Q*) and price (P*) using matrix operations. Clearly label your solution.