Chat with us, powered by LiveChat MATLAB HW | Writedemy

MATLAB HW

MATLAB HW

Use MATLAB to solve each problem by writing script files; copy and paste the script file AND the results in the Command Window and/or plot in the Figure Window to 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 and staple 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 xrepresents time in seconds. Include title, grid, and axis labels.

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

A

C

B

W

LAB

LAC

D

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 cos + TAC cos = 0

TAB sin + TAC sin = W

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

From the law of sinesFor 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 = 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.

Diode

+

VS

VL

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

vL = vS if 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(t) 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.

1. 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.

÷

÷

ø

ö

ç

ç

è

æ

Our website has a team of professional writers who can help you write any of your homework. They will write your papers from scratch. We also have a team of editors just to make sure all papers are of HIGH QUALITY & PLAGIARISM FREE. To make an Order you only need to click Ask A Question and we will direct you to our Order Page at WriteDemy. Then fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Fill in all the assignment paper details that are required in the order form with the standard information being the page count, deadline, academic level and type of paper. It is advisable to have this information at hand so that you can quickly fill in the necessary information needed in the form for the essay writer to be immediately assigned to your writing project. Make payment for the custom essay order to enable us to assign a suitable writer to your order. Payments are made through Paypal on a secured billing page. Finally, sit back and relax.

Do you need an answer to this or any other questions?

About Writedemy

We are a professional paper writing website. If you have searched a question and bumped into our website just know you are in the right place to get help in your coursework. We offer HIGH QUALITY & PLAGIARISM FREE Papers.

How It Works

To make an Order you only need to click on “Order Now” and we will direct you to our Order Page. Fill Our Order Form with all your assignment instructions. Select your deadline and pay for your paper. You will get it few hours before your set deadline.

Are there Discounts?

All new clients are eligible for 20% off in their first Order. Our payment method is safe and secure.

Hire a tutor today CLICK HERE to make your first order