Write a function that accepts a year as an input argument and determines whether the year is a leap year. Use the mod function. The output should be the variable extra_day, which should be 1 if the year is a leap year and 0 otherwise. The rules for determining leap years in the Gregorian calendar are as follows:
For example, the years 1800, 1900, 2100, 2300 and 2500 are not leap years, but 2400 is a leap year.
You must write a script file that thoroughly tests whether your function works correctly.
Q2
Submit your solution as m-files
Q3
Submit your solution as m-files
Q4
Estimate the roots of the equation
by plotting the equation and observing what the values of the roots are from the plot. Report your result by displaying the values to the Command Window. The estimate only needs to be accurate to 2 significant figures.
Submit your solution as m-files
Q5
Write a function that solves a system of linear equations.
Use your function to solve the following:
a).
b).
c).
Submit your solution as m-files
Q6
The following data give the stopping distance d as a function of initial speed v, for a certain car model. Find a quadratic polynomial that fits the data. Determine the quality of the curve fit by computing J, S and R2. Compare the quality of the quadratic curve-fit to an exponential curve-fit graphically and numerically.
v (mi/hr) | 20 | 30 | 40 | 50 | 60 | 70 |
d (ft) | 45 | 80 | 130 | 185 | 250 | 330 |
Submit your solution as m-files
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more