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

  Find the potential energy stored in each spring

The potential energy stored in a spring is kx2/2, where k is the spring constant and x is the compression in the spring. The force required to compress the spring is kx. The following table gives the data for five springs:

  Filtering – biomedical application

Prepare a filter that removes noise produced by electronic medical equipment.

  Write a matlab script that solve system of linear equations

Write a Matlab script that will solve the system of linear equations shown below. This can be done by solving for the vector of unknowns (X) in the equation AX=B where A is the coefficient matrix and B is the vector on the right-hand side.

  Write a matlab code that plots the phase portrait of system

Write a MATLAB code that plots the phase portrait of the system. The values of the parameters r1, r2, K1, K2 are fixed and to be extracted from your matriculation number and you'll need to write a report that describes the behaviour of the system un..

  Write a matlab function that generates sentences

Write a MATLAB function that generates sentences of the form (xy)^nz^n , where n is an integer > 0 provided as an argument to your function. This is how the function starts.

  With a time step of h 01 in each case use starting values

dydt yt- yt2 1 le t le 2 y1 1approximate the solution to the above initial value problem usinga 2-step

  A function of the energy e of the beams

A new particle has been discovered in a lab by colliding two beams of leptons and measuring how many particles are produced as a function of the energy E of the beams. The table below gives the results.

  Consider the predator-prey models

Consider the predator-prey models developed early part of the 20 th  century in which the number of predators and preys may be predicted using the pair of ODEs

  Write a user-defined matlab function

Write a user-defined MATLAB function that calculate the condition number of an (nxn) matrix by using the 1-norm. for the function name and arguments use c = condNum_one(A).

  Determine the level of absolute approximate relative error

2006ENG Numerical and Data Analysis. Convert the equation into f(T) = 0 when cp of 1.1kJ/kgK. In our MATLAB program, develop a plot of f(T) versus a range of T = 0 to 1200 K. MATLAB. On the axes, put proper labelling.

  Design a matlab application that has transformer power ratin

Design a MATLAB application that has the following input data:Transformer power rating (VA), Transformer voltage ratings (VH and VL) Open-Circuit test results: VO, IO, and PO Short-Circuit test results: VSC, ISC, and PSC. Identify on which side each ..

  Estimate the area of the tea spill

The surface area of a tea spill is estimated by measuring the width (in cm) of the spill at equally spaced intervals of 1.5 cm (width data is found in TeaSpill.txt). Use numerical integration to estimate the area of the tea spill.

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