Question

10. The electricity supply cables of the three houses shown are connected to a pole as shown. Write a MATLAB program that deter- mines the location of the pole (distance x) that G minimizes the total length of the cables needed. In the program define a vector x with values ranging from 50 to 200 with increments of 0.1. Use this vector to calculate the corre- F_-210ft- sponding values of total length of the cables. Then use MATLABs built-in function min to find the value of x that corresponds to the shortest length of cables 80 ft 80 ft

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Matlab code:

x=[50:0.1:200];
total_length=[];
for i=x
total_length=[total_length i+2*sqrt(80^2+(210-i).^2)];
%leaving x the other two cables have same length so 2*sqrt(80^2+(210-i).^2
%sqrt(80^2+(210-i).^2) this is hypotenuse which can be calculated by
%pythagorean theorem
end
min_length=min(total_length);
disp('Minimum total length of cables(in ft.):');
disp(min_length);
index=find(total_length==min_length);
min_x=x(index);
disp('value of x for the length of cables to be minimum is(in ft.):');
disp(min_x);

Output:

Add a comment
Know the answer?
Add Answer to:
The electricity supply cables of the three houses shown are connected to a pole as shown....
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please show matlab editor and command window B. (4 pts) Use the : operator to create...

    Please show matlab editor and command window B. (4 pts) Use the : operator to create the vectors x [2.5,1.50.5,-0.5,-1.51 and y [0.4,0.8,1.2,1.6,2], then use them in the following expression to compute vector z using element-by-element calculations C. (8 pts) A 70 lb bag of rice is being pulled by applying a force F at an angle θ as shown. The force required to drag the bag is given by: θ μ sin θ + cos θ Where u-0.35 is...

  • A fence is required around a field is shaped as shown below. It consists of a...

    A fence is required around a field is shaped as shown below. It consists of a rectangle of length Land width Wand a right triangle that is symmetrical about the central horizontal axis of the rectangle. Suppose the width is known (in metres), and the enclosed area A is known (in square metres). w 1. Use pen and paper to determine the equations for the total area and perimeter in terms of the width W, and length L. 2. Use...

  • Problem 1 Use the trapezoidal rule technique to approximate the following integrals: a) 「(x2+1)d...

    help wanted?? thank you explain correctly Problem 1 Use the trapezoidal rule technique to approximate the following integrals: a) 「(x2+1)dr(Note: use 0.5 increments forx) b) sina d INote: use a MATLAB function to subdivide the interval into eight equal parts) c e dx (Note: use 0.25 increments for x Problem 2 Use the Simpson's rule to evaluate the following integrals aDdr Problem 3: Given the polynomial: x3-6x2 + 30-0, Use MATLAB to find all roots of this polynomial. Use MATLAB's...

  • The Green Monster, as shown below, is a wall 37 feet high in left field at...

    The Green Monster, as shown below, is a wall 37 feet high in left field at Fenway Park in Boston. The wall is 310 feet from home plate down the third base line. If the batter hits the ball 4 feet above the ground, neglecting air resistance, determine the minimum speed that the bat must impart to the ball that is hit over the Green Monster. COVIDIE CVS. ELABOR The equations of motions for the baseball are x(t) = (u...

  • The wing of a fighter aircraft, carrying a missile at its tip, as shown in Figure...

    The wing of a fighter aircraft, carrying a missile at its tip, as shown in Figure 1, can be approximated as an equivalent cantilever beam with EI 15 X 10 N-m about the vertical axis and length L 10m The equivalent mass of the wing, including the mass of the missile and its carriage system, at the tip of the wing is m-2,500 kg. Assume a damper coefficient of 20,000 N-m /s. The load is modeled as shown in Figure...

  • use matlab and show all codes and work the question continues from this 4. Write a...

    use matlab and show all codes and work the question continues from this 4. Write a function with header (A, V - myCone (r, h), which outputs the total area A and volume of a cone with base radius r and height h. 5. Write a function - myMatrix (myvec, m, n) which creates an m-by-n matrix A, as in Problem 3, but for arbitrary values of mand n and any length of vector myvec. Hint: the function can use...

  • x=3 Question 3. A crank shaft mechanism is shown in Figure 3. Link Bis rotating with...

    x=3 Question 3. A crank shaft mechanism is shown in Figure 3. Link Bis rotating with a constant angular velocity wgaz in the fixed reference frame A as shown in the figure. For this mechanism: (a) Using the vector kinematic equations and methods taught in this [20 marks] module, obtain the expressions for velocity and acceleration of point in the fixed frame A, in terms of wg.ls.c. and e. (b) Velocity analysis using MATLAB: As link B undergoes one full...

  • Write a C++ program to solve: The completed program should include the following: —Program input and...

    Write a C++ program to solve: The completed program should include the following: —Program input and output —Allow the user to input the starting, stopping and increment values for the insulation thickness and the air temperature. Also, at the end of the program, provide an opportunity for the user to use the program again without having to re-execute the program (ie. Ask them if they want to use the program again). —your program must find and output the value of...

  • MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x...

    MATLAB only please I am trying to get my getdatafuntion to work. I am also trying to get all my x's, y's, and v's to popup in the command window so I can put in any value and it will find the value for me using the equation I put in. function project_9_sjl() % PROJECT_9_SJL project_9_sjl() is the driver function for the program. % %    Name: Scott Lawrence %   Date: 3/27/2019 %   Class: CMPSC 200 %   Description: Determine the optimal...

  • The Depth Gauge Problem Liquids are often stored in elliptical storage tanks as shown below. To...

    The Depth Gauge Problem Liquids are often stored in elliptical storage tanks as shown below. To measure the volume of liquid in the tank, a depth gauge (measuring stick) can be used. It is inserted into an opening at the top and the level of liquid on the gauge can be used to determine the amount of liquid in the tank. The tank has width w, height h and length len (all in meters). In the example output shown below,...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT