Matlab Assignment

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:

  1. All years evenly divisible by 400 are leap years.
  2. Years evenly divisible by 100, but not by 400, are not leap years.
  3. Years divisible by 4, but not by 100, are leap years.
  4. All other years are not leap years.

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

  1. Question 22 from Chapter 4, which is:
  2. Use a forloop to determine the sum of the first 10 terms in the series 5k3, where k=1,2,3,…,10.  Report your answer to the Command Window.
  3. Repeat part (a) without using a loop.

Submit your solution as m-files

 Q3

  1. Question 32 from Chapter 4, which is:
  2. Use a whileloop to determine how many terms in the series 2k, where k=1,2,3,…, are required for the sum of the terms to exceed 2000.  Report your answer to the Command Window.
  3. What is the sum for this number of terms?  Report your answer to the Command Window.

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

Place your order
(550 words)

Approximate price: $22

Calculate the price of your order

550 words
We'll send you the first draft for approval by September 11, 2018 at 10:52 AM
Total price:
$26
The price is based on these factors:
Academic level
Number of pages
Urgency
Basic features
  • Free title page and bibliography
  • Unlimited revisions
  • Plagiarism-free guarantee
  • Money-back guarantee
  • 24/7 support
On-demand options
  • Writer’s samples
  • Part-by-part delivery
  • Overnight delivery
  • Copies of used sources
  • Expert Proofreading
Paper format
  • 275 words per page
  • 12 pt Arial/Times New Roman
  • Double line spacing
  • Any citation style (APA, MLA, Chicago/Turabian, Harvard)

Our guarantees

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.

Money-back guarantee

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 more

Zero-plagiarism guarantee

Each 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 more

Free-revision policy

Thanks 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 more

Privacy policy

Your 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 more

Fair-cooperation guarantee

By 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
error: Content is protected !!
Open chat
1
You can contact our live agent via WhatsApp! Via + 1 (929) 473-0077

Feel free to ask questions, clarifications, or discounts available when placing an order.

Order your essay today and save 20% with the discount code SCORE