Calculates a students final grade in a course

Assignment Help MATLAB Programming
Reference no: EM131450153

Assignment

Use MATLAB to solve each problem by writing script files; copy and paste the script file AND the results in the Command Windowand/or plot in the Figure Windowto a WORD document that has your name and section in the headers of each page and the page number in each footer. Edit the output to remove extra lines and empty spaces. The script files SHOULD have comments for easy readability; take a print out of the Word file andstaple before submission.

1. Plot the function y = 10(1-e-x/4) over the interval 0 £ x £xmax, using a while loop to determine the value of xmax such that y(xmax) = 9.8. The variable y represents force in Newtons, and the variable x represents time in seconds. Include title, grid, and axis labels.

2. A weight is supported by two cables anchored a distance D apart as shown.

746_A Weight.jpg

The cable length LAB is given, but the length LAC is to be selected. Each cable can support a maximum tension force equal to W. For the weight to remain stationary, the total horizontal force and the total vertical force must each be zero. This principle gives the equations

          -TAB cosq + TAC cos f = 0
           TAB sinq + TAC sin f = W

W can solve these equations for the tension forces TAB and TAC if we know the angles q and f. From the law of cosines

                                            θ = cos-1 [(D2 + L3AB - L2AC) / 2DLAB]
From the law of sines              Φ = sin-1 (LAB sinθ / LAC)

For the given values D = 6 feet, LAB = 3 feet, and W = 2000 pounds, use a loop in MATLAB to find LACmin, the shortest length LAC we can use without TAB or TAC exceeding 2000 pounds. Note that the largest LAC can be is 6.7 feet (which corresponds to q = 90°). Plot the tension forces TAB and TAC on the same graph versus LAC for LACmin£ LAC£ 6.7.

3. An ideal diode blocks the flow of current in the direction opposite that of the diode's arrow symbol. It can be used to make a half-wave rectifier as shown.

1501_Half-Wave Rectifier.jpg

For the ideal diode, the voltage vL across the load RL is given by

               vL = vSif  vS> 0
                   = 0      if  vS£ 0

For a non- ideal (silicon) diode, the voltage vL is given by

               vL = vS-0.6    if  vS> 0.6
                   = 0      if  vS£ 0.6

Suppose the supply voltage is vs(t) = 3e-t/3 sin(pt) volts, where time t is in seconds. Write a MATLAB program to plot the voltage  vL versus t for both ideal and non-ideal cases  and the voltage vS versus t for 0 £ t £ 10 on the same axes.

4. Write a user-defined MATLAB function that calculates a student's final grade in a course using the scores from three midterm exams, a final exam, and six homework assignments. The midterms are graded on a scale from 0 to 100, and are each 15% of the final grade. The final exam is graded on a scale from 0 to 100, and is 45% of the final grade. The six homework assignments are graded each on a scale from 0 to 10. The homework assignments together are 10% of the final grade.

For the function name and arguments use g=fgrade(R). The input argument R is a matrix in which the elements in each row are the grades of one student. The first six columns are the homework grades (numbers between 0 to 10), the next three columns are the midterm grades (numbers between 0 to 100), and the last column is the final grade (a number between 0 to 100). The output from the function, g, is a column vector with the final grades for the course. Each row has the final grade of the student with the final grades in the corresponding row of the matrix R. 

The function can be used to calculate the grades of any number of students. For one student matrix R has one row. Use the function in the following cases:

a) Use the Command Window to calculate the grade of one student with the following grades:

(8, 9, 6, 10, 9, 8, 76, 86, 91, 80).

b) Write a program in a script file. The program asks the user to enter the student's grades in an array (each student a row). The program then calculates the final grades by using the function fgrade. Run the script file to calculate the grades of the following four students:   

Student A:  8, 10, 6, 9,10,9, 91, 71, 81, 85.
Student B:  5, 5, 6, 1, 8, 6, 59, 72, 66, 59.
Student C:  6, 8, 10, 4, 5, 9, 55, 65, 75, 78.
Student D:  7, 7, 8, 8, 9, 8, 83, 82, 81, 84.

Reference no: EM131450153

Questions Cloud

What sampling method is used to select your sample data : Organise your sample data in a spreadsheet as per the instructions in the Excel sheet. What sampling method is used to select your sample data
Difference between automatic and controlled processing : What is the difference between automatic and controlled processing of persuasive messages?
Deciding between two mutually exclusive investment opportuni : You are deciding between two mutually exclusive investment opportunities. Both require the same initial investment of $10.0 million. Investment A will generate
Select the topic from given list and describe it : Party A is to select a topic from the following list: Managing in the Middle East is significantly different from managing in North America.
Calculates a students final grade in a course : Write a user-defined MATLAB function that calculates a student's final grade in a course using the scores from three midterm exams, a final exam.
Frugal people and decided to help you save for future : Your grandparents were frugal people and decided to help you save for future. what is the present value?
How much money will be in the account after three years : Suppose you deposit $726 today, $523 in one year and $273 in two years in an account that pays the annual rate of interest of 19.00%. How much money will be in
What do you think is the future direction of social media : As you know, social media have transformed the way we interact. The transparent, rapid-fire communication they make possible means people can spread information
What is their yield to maturity : Wilson Corporation’s bonds have 12 years remaining to maturity. Interest is paid annually, the bonds have a $1,000 par value, and the coupon interest rate is 10

Reviews

Write a Review

MATLAB Programming Questions & Answers

  Finite difference method

Use the finite difference method to calculate the temperature at the point specified since it is easier.

  Determine the necessary shell temperature

In a shell-and-tube heat exchanger, one fluid passes through a central tube while another fluid flows through an outer shell in the opposite direction. The purpose is to heat the fluid passing through the central tube.

  Find the integral of a function at an arbitrary location

Write a Matlab function to perform numerical integration of a set of evenly spaced data points using the trapezoidal rule

  Compute the speed of single-stage planetary gear train

Write a MATLAB function [speed] = planetary (N, emesh, first, last, arm) that computes the speed of a given link in a single-stage planetary gear train.

  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.

  Create the graph using matlab functions

Create the graph, which contains a piecewise function where a line exists in the first interval, a parabola in the second interval, and the sine function in the third interval.

  Develop a simulation program

Develop a simulation program

  Create a vector in matlab

Create a three dimensional diagram of function.

  Open a named pipe and to read data from the pipe

Open a named pipe and to read data from the pipe in matlab

  Write the commands that will create the matrix

Write the commands that will create the matrix.

  Lagrange interpolating polynomial of degree

Lagrange interpolating polynomial of degree

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