Answered step by step
Verified Expert Solution
Question
1 Approved Answer
It looks like this is two questions but it really is one question, first building the code then running it. The question being asked is
It looks like this is two questions but it really is one question, first building the code then running it. The question being asked is circled. Thank you very much!
(b) 2r (Why does 27 take so much longer than 2 aud 20 (c) 28 (d) 670,617,279 (this is the longest the process takes for any starting number less than 1 billion) suga 5. (4 points) Now, look up the Collatz conjecture on the Wikipedia. There is a plot with red dots. Let's make that plot. Write a script file that repeatedly calls your functio from part (a), runs through the number of steps required by the Collatz conjecture. Use a plot (num,steps, o command at the end to generate the plot. Turn in the plot. all integers from 1 to 10,000, and creates an array containing 6. (No points, but this function uwill be used m the following problem.) Write a function leap.n that takes a year as an input and outputs a 1 if the year is a leap year and a otherwise. Here are the rules for leap years: . Years divisible by 400 are leap years. Years divisible by 100 but not 400 are not leap years. .All years divisible by 4 but not by 100 are leap years. All other years are not leap years. The mod command in MATLAB will be helpful. If mod (a,b) equals 0, then a is divisible by b 7. (6 points) Write a program that takes a month, day, and year as inputs and returns the number of days that have passed since January 1, 780, the year al-Khwarizmi, the "father of algebra," was born (include the 1/1/780 date as day 1). Your program should call your leap.m to ensure you account for leap years. Use your program to compute the number of days from January 1, 780 to the following significant cultural events (I've given the answer for the first question as a means of testing your code): 1. June 21, 2011, The LMFAO robot does its incredible dance. (449,786 days) 2. July 24, 1965. Dylan goes electric 3. June 11, 1993. Jurassic Park shows that, ultimately, it's all just DNA. 4. August 16, 2008. Usain Bolt runs 100 meters in a world record 9.683 seconds at the Beijing olympics Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started