You have been assigned to a new project at work. The previous engineer had created the following files, which your new boss claims do not work. Debug the program to correct all errors.
These files must be corrected to eliminate any syntax, runtime, formula coding, and formula derivation errors. You may assume that the header comments at the top of the program and all comments throughout the program are correct.
% Problem Statement: A rod on the surface of Jupiter’s
% moon Callisto has a volume of 0 . 3 cubic meters and
% specific gravity of 4.7. The gravitational constant is
% 1.25 meters per second squared. Determine the weight of
% the rod in units of pounds-force.
% Inputs :
% Specific Gravity SG 4.7 [-]
% Volume v 0.3 m^3
% Outputs:
% Weight w ??? lbf
% Other variables:
% Density rho ??? kg/m^3
% Assumptions:
% Gravity g 1.25 m/s^2
% Density of water r_w 1000 kg/m^3
% Define input variables
25 = SG;
g = 1.25 m/s^2;
RHO_water = 1;
VOL = 0.3 m^3;
% Calculate rod density [kg/m^3) using specific gravity
SG=Rho*r_w/l 000*62.4;
% Calculate weight of rod
w = (Rho / V) (g);
Want to see the full answer?
Check out a sample textbook solutionChapter 16 Solutions
THINKING LIKE AN ENGINEER W/ACCESS
- You own a wheat warehouse with a capacity of 20,000bushels. At the beginning of month 1, you have 6,000 bushels of wheat. Each month, wheat can be bought and sold at theprice per 1000 bushels given in Table 46.The sequence of events during each month is as follows:a You observe your initial stock of wheat.b You can sell any amount of wheat up to your initialstock at the current month’s selling price.c You can buy (at the current month’s buying price) asmuch wheat as you want, subject to the warehouse sizelimitation.Your goal is to formulate an LP that can be used to determine how to maximize the profit earned over the next 10monthsarrow_forwardYou are recently promoted as the chief traffic management officer of a major city in the country. Based on recent data, you learned that one of the leading causes of road accidents is over speeding.In your desire to minimize road accidents, you went out to observe how traffic management rules are implemented on the streets. Your attention was caught by a fast - moving car that seemed to be breaking the speed limit of 100 kilometers per hour(km/hr.), and so you followed it along the highway. After a short time, the driver of the car noticed you and started to slow down. Eventually, he stopped on the side of the road. Supposed the speed of the car had been noted during this time and is modeled by the quadratic equation y = 3x² + 17x - 20, where y represents the speed of the car in km/hr. and x represents the number of minutes after you started following the car. How long did it take for the car to be under surveillance before it could finally stop on the side of the road? Did the driver…arrow_forwardEngineering Economy A company has determined the price and the monthly demand of its products are related by the equation D = √775 - p, where p is the price per unit in dollar and D, is the monthly demand. The associated fixed costs are $2,125 per month and the variable costs are $100/ unit. Use this information to answer the following: a)What is the optimal number of units that should be produced and sold each month? b) What is the maximum profit? c)Determine the value of D that represents the break-even point?arrow_forward
- Learning Goal: To use equilibrium to calculate the plane state of stress in a rotated coordinate system. In general, the three-dimensional state of stress at a point requires six stress components to be fully described: three normal stresses and three shear stresses (Figure 1). When the external loadings are coplanar, however, the resulting internal stresses can be treated as plane stress and described using a simpler, two-dimensional analysis with just two normal stresses and one shear stress (Figure 2). The third normal stress and two other shear stresses are assumed to be zero. The normal and shear stresses for a state of stress depend on the orientation of the axes. If the stresses are given in one coordinate system (Figure 3), the equivalent stresses in a rotated coordinate system (Figure 4) can be calculated using the equations of static equilibrium. Both sets of stresses describe the same state of stress. The stresses σx′and τx′y′ can be found by considering the free-body…arrow_forwardPlease anwer the quesiton correctly and take your time, i read the guideline and honor code and im allowed to have Submit only one question at a time under the appropriate subject. A question can have up to 3 subparts (i.e. part a, b, and c). Here is the link that says from bartleby if you odnt belive me: https://bartleby.zendesk.com/hc/en-us/articles/360017462394-How-can-I-ensure-my-questions-get-answered-as-quickly-as-possible-So answer all the questions thanks.Calculate the frequency of a radio wave.1. A) radio wave has a wavelength of 21 cm. What is the wavelength in meters? (Give your answer in meters rounded to exactly 2 decimal places).B)Use your previous answer and the speed of light (c = 3 · 108 m/s) to calculate the frequency of a 21 cm radio wave. Give your answer in Hz, no decimal places.C)Use your previous answer to calculate the frequency of a 21 cm radio wave. This time, give your answer in GHz, rounded to exactly one decimal place. (Note that 1 GHz = 109 Hz).arrow_forwardThe following tools / resources may be useful for you to complete the assignment:a. Chatgpt (You may use it to learn Matlab coding or any other computer language. An example is given here: https://shareg.pt/mXHGne9 ). Please take note that code generated by chatgpt can be directly copied and pasted.b. Matlabi) Useful cheat sheet (https://n.ethz.ch/~marcokre/download/ML-CheatSheet.pdf)ii) Getting started with Matlab (https://matlabacademy.mathworks.com/en/details/gettingstarted )iii) Getting 30-day Matlab trial license (https://www.mathworks.com/campaigns/products/trials.html ) iv) Polyfit (https://www.mathworks.com/help/matlab/ref/polyfit.html )v) Exponential Fit (https://www.mathworks.com/matlabcentral/answers/91159-how-do-i-fit-an-exponential-curve-to-my-data)c. PlotDigitizer (https://plotdigitizer.sourceforge.net/ ) or a free online app that does not requires installation (https://plotdigitizer.com/app )You may use your own engineering judgement to make any assumptions on any…arrow_forward
- Recall the discussion on spacecraft from the chapter opener. The following problems consider a rocket launch from Earth’s surface. The force of gravity on the rocket is given by F(d)=−mk/d2, where m is the mass of the rocket, d is the distance of the rocket from the center of Earth, and k is a constant. 172. As the rocket travels away from Earth’s surface, there is a distance D where the rocket sheds some of its mass, since it no longer needs the excess fuel storage. We can write this function as F(d)=⎨(−m↓1 k / d^2) if d < D (−m↓2 k / d^2) if d ≥ D Is there a D value such that this function is continuous, assuming m1≠m2?arrow_forwardNeed help with these Q2. Identify any zero force members. ( there can be more than one ) Member AB Member AJ Member BCBC Member BH Member BJ Member CD Member CG Member CH Member DE Member DF Member DG Member EF Member FG Member GH Member GJ q3. You are asked to find the forces in members GHGH and CGCG using the Method of Sections. Which members should you make a cut through? Member AB Member AJ Member BC Member BH Member BJ Member CD Member CG Member CH Member DE Member DF Member DG Member EF Member FG Member GH Member GJ Q4. Having made a cut through the members in the previous part, you next want to solve for Member GH. Which of the following equilibrium equations is the most efficient? (i.e. which one will allow you to solve for the required member in one equation?) a. ΣFx=0. b. ΣMC=0. c. ΣMH=0. d. ΣFy=0 e ΣMD=0arrow_forward1. State given parameters 2. State unknowns 3. List equations to use 4. Show complete solution 5. Box and highlight final answer I'll upvote if it is typewritten. Thank youarrow_forward
- Hi, I need help with the first part of the problem below because I'm very confused about how P1 and P2 should be calculated. If you look at my notes to solve the problem there is already a formula in place as I always thought the Patm should also be multiplied by the Area in the numerator, but it's not if I look at this specific tutorial solution given by my course but it's not explained why. I have done a while ago a very similar problem with using that formula in my notes and it gave me the right results, but it's not working for this one. Could you please help me understand why as I have a test coming soon? Figure Q3 (see image attached) shows a cylinder and pistonenclosing air, the movement of the pistonbeing restrained by a compression spring ofstiffness 20 kN/m. The air is heated andexpands, the piston moving 0.3 m. Thefree length of the spring is 1.0 m.Calculate the work done by the air duringthe process.If the pressure , volume and internal energyof air are related by the…arrow_forwardTHERMODYNAMICS UPVOTE WILL BE GIVEN. PLEASE WRITE THE COMPLETE SOLUTIONS/DIAGRAMS LEGIBLY. NO LONG EXPLANATION NEEDED. USE 3 DECIMAL PLACES. BOX THE FINAL ANSWER. An airplane is cruising at an elevation of 35,000 feet from sea level. Determine the amount of gage pressure in bars needed to pressurize the airplane to simulate sea level conditions. The average atmospheric pressure on earth is mated as a function of altitude by the relation Patm = 101.325 (1- 0.02256z)5.256, where Patm is the atmospheric pressure in kPa and z is the altitude in km with z = 0 at sea level.arrow_forwardafter solving, pls explain why u got the answer really need an explanation thank u so much pls explain in sentences. will ratearrow_forward
- Elements Of ElectromagneticsMechanical EngineeringISBN:9780190698614Author:Sadiku, Matthew N. O.Publisher:Oxford University PressMechanics of Materials (10th Edition)Mechanical EngineeringISBN:9780134319650Author:Russell C. HibbelerPublisher:PEARSONThermodynamics: An Engineering ApproachMechanical EngineeringISBN:9781259822674Author:Yunus A. Cengel Dr., Michael A. BolesPublisher:McGraw-Hill Education
- Control Systems EngineeringMechanical EngineeringISBN:9781118170519Author:Norman S. NisePublisher:WILEYMechanics of Materials (MindTap Course List)Mechanical EngineeringISBN:9781337093347Author:Barry J. Goodno, James M. GerePublisher:Cengage LearningEngineering Mechanics: StaticsMechanical EngineeringISBN:9781118807330Author:James L. Meriam, L. G. Kraige, J. N. BoltonPublisher:WILEY