Create a function file that computes the distance

Assignment Help MATLAB Programming
Reference no: EM13767511

Question 1:

The capacitance of two parallel conductors of length L and radius r, separated by a distance d in air, is given by

C = Π∈L/ln[(d-r)/r]

where c is the permittivity of air (∈ = 8.854x 10-12 F/m).

Write a script file that accepts user input for d, L, and r and computes and displays C. Test. the file with the values L=1m, r= 0.001 m, and d =0.004 m.

Question 2:

Write a function that accepts temperature in degree Fahrenheit(0F)and computes the corresponding value in degrees Celsius (0c). The relation between the two is

T0C = 5/9(T0F - 32)

Be sure to test your function.

Question 3:

The height and speed of a projectile (such as a thrown ball) launched with a speed of u0 at an angle A to the horizontal are given by

h(t) = vot sin A - 0.5 gt2

v(t) = √(v2o- 2vogt sinA + g2t2)

where g is the acceleration due to gravity. The projectile will the ground when h(t) = 0, which gives the time to hit thit= 2(u0/g) sin A.

Suppose that A. 300, u0 = 40 m/s, and g = 9.81 m/s2. Use the MATLAB relational and logical operators to find times when

a. The height is no less than 15 rn.

b. The height is no less than 15 m and the speed is simultaneously no greater than 36 m/s.

c. The. height is less Man 5 m or the speed is greater Man 35 m/s.

Question 4:

Figure P20 shows a mass-spring model of the type used to design packaging systems and vehicle suspensions, for example. The springs exert a force that is proportional to their compression, and the proportionality constant is the spring constant k. The two side springs provide additional resistance if the weight W is too heavy for the center spring. When the weight W is gently placed, it moves through a distance x before coming to rest. From statics, the weight force must balance the spring forces at this new position. Thus

W=k1x if x<d

W=k1x+2k2(x-d)if xd

These relations can be used to generate the plot of x versus W.

a. Create a function file that computes the distance x, using the input parameters W, k1, k2 and d. Test your function for the following two cases, using the values k1 = 104 N/m; k2 =1.5 x 104 N/m; d =0.1 m.

W=500 N

W=2000 N

b. Use your function to pot x versus W for 0 ≤ Ws ≤ 3000 N for the values of k1. k2, and d given in part a.

2079_function.png

Question 5:

We want to analyze the mass spring system discussed in Problem previous problem for the case in which the weight W is dropped onto the platform attached to the center spring. If the weight is dropped from a height h above the platform. we can find the maximum spring compression x by equating the weight's gravitational potential energy with the potential energy stored in the springs. Thus

W(h+x) = 1/2k1x2 if x< d

which can be solved for x as

x = [W ± √(W2 + 2k1Wh)]/k1 if x < d

and

W(h+ x) = 1/2k1x2 + ½(2k2(x - d)2 if x ≥ d

which gives the following quadratic equation to solve for x: (k1 + 2k2)x2 - (4k2d + 2 W) + 2k2d2 - 2 wh =0 if x ≥ d

a. Create a function file that computes the maximum compression x due to the failing weight. The function's input parameters are k1, k2,d, w and h. Test your function for the following two cases, using the values. K1

= 104 N/m k2 = 1.5 x 104 N/m; and d = 0.1 m.

W=100 N h=0.5 m W =2000 N h =0.5 M

b. Use the function file to generate a plot of x versus h for 0 ≤ h  ≤ 2 m. Use w = 100N and proceeding  values for k1, k2, k3 and d.

Question 6:

Engineers often need to estimate the pressures and volumes of a gas in a container. The van der Waals equation is often used for this purpose. It is

P = RT/V' - b = a/v'2

where the term b is a. correction for the vokene of the molecules and the term a/v^2 is a correction for molecular attractions. The gas constant is R, the absolute temperature is T, and the gas specific volume is V^. The value of is the same for all gases; it is R = 0.08206 L.atm/mol-k. The values of a and b depend on the type C4 gas. Some values are given in the following table. Write a user defined function using the switch structure that computes the pressure P on the basis of the van der Waals equation. The function's input arguments should be T, V^, and a string variable containing the name of a gas fisted in the table.

Test your function for chlorine (C12) for T= 300 K and V^= 20 Land.

Gas

a(L2-atm/mol2)

b(L/mol)

Helium, He

0.0341

0.0237

Hydrogen, 112

0.244

0.0266

Oxygen. 02

1.36

0.0318

Chlorine, Cl2

6.49

0.0562

Carbon dioxide. CO2

3.59

0.0427

Reference no: EM13767511

Questions Cloud

Write a paper on communication theory : write a paper on Communication Theory. Discuss what Communication scholars have learned about your topic that could be relevant to your own experiences (give examples).
Specific uses of diamond and graphite allotropes of carbon : Diamond and graphite are the two primary allotropes of carbon. Neither is generally considered hazardous, but they have their own specific uses. Choose which of the following statements is TRUE regarding these allotropes.
Compute the equivalent units of production : Compute the equivalent units of production for the first department for June, assuming that the company uses the weighted-average method of accounting for units and costs.
Measurement and basis of accounting : Question 1. Fiduciary funds are to use which of the following measurement and basis of accounting?
Create a function file that computes the distance : Write a function that accepts temperature in degree Fahrenheit and computes the corresponding value in degrees Celsius. The weight force must balance the spring forces at this new position.
Michael is a professor of biology at devry university : Michael is a Professor of Biology at DeVry University and has collected "30" largemouth bass from "4" separate lakes to get weight distributions, measure of girth, and length. He currently has the data saved in a Microsoft Excel workbook with data fr..
A discussion on improving the technology : You work at a High School. The High School currently lost their IT specialist and are in the process of hiring a new one. In the meantime, you were asked to join a discussion on improving the technology at the high school based on your background and..
Problem related to the inventory errors : At December 31, 2014, McGlaggen Corporation reported current assets of $638,000 and current liabilities of $384,000. The following items may have been recorded incorrectly.
Rolls presents a model of visual consciousness : Rolls presents a model of visual consciousness. Mandik presents his view on the neurophilosophy of consciousness. In your opinion, is Rolls''s model a trivial or substantive view of consciousness?

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Modify the functions for the bisection and false-position

Modify the functions for the bisection and false-position techniques of finding a root of an equation (see below questions) so that the number of iterations can be determined and displayed. (The count should only be displayed after the loop is com..

  Obtain the cross products using matlab cross function

Use MATLAB cross function to obtain the above cross products. Note that the accelerations are known functions of the derivatives of the three coordinates.

  Calculate and plot the error in the numerical derivative

Write a program to calculate and plot the error in the numerical estimate of the derivative.

  Finds the value of a using a numerical method

Finds the value of a using a numerical method

  Matlab function to perform gauss-jordan elimination

Write a matlab function to perform gauss-jordan elimination with pivoting. Modify the pivoting so that it is using the row with the highest absolute value rather than the first non-zero row.

  Simulate rigid body mechanics

Write a MATLAB code to simulate rigid body mechanics. Create a video file of a free falling rod. Neglect effects from drag or loss of kinetic energy. Make sure the rod falls onto one end showing how the rigid body reacts to hitting the ground. Cannot..

  Pattern recognition

Research and discover more in-depth knowledge about topics in Pattern Recognition and choose a topic. The best topic will be the one you are most interested in or a topic from your research project you are working on.

  Write a function named ''read_line''

Verify that your code works by saving some text into a file (created in notepad / textedit) and saving the file with extension '.txt'. You should attach the file (call it 'test.txt') with your code.

  Hi i attached the instructions would you guys do it by 50

i attached the instructions. ltbrgt ltbrgtwould you guys do it by 50 dollars ? ltbrgt ltbrgtit is due this friday

  Write a function that takes a list of integers

Using ML write a function that takes a list of integers as argument and returns a pair consisting of the sum of the even position and the sum of the odd positions of the list.

  Draw the set x on a two-dimensional plane

Draw the set X on a two-dimensional plane and draw the set Yon a two-dimensional plane. Comment on the mapping - Draw the set Z on a two-dimensional plane.

  Simulate and compare the ber of a 16-psk system

Question is that" Simulate and compare the BER of a 16-PSK system and a 16-QAM system without Grey coding and Eb/N0=0,2,4,6,8,10 dB. "

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd