Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The Matlab work I am no idea for using the 'diff' and loop clc clear Year = [2019,2020,2021,2023,2024,2026]; Month = [7,12,12,4,4,8]; Day = [2,14,4,20,8,12]; Y=2001:1:2100;

The Matlab work

I am no idea for using the 'diff' and loop

image text in transcribedimage text in transcribed

clc

clear

Year = [2019,2020,2021,2023,2024,2026];

Month = [7,12,12,4,4,8];

Day = [2,14,4,20,8,12];

Y=2001:1:2100;

M=diff(Month);

D=diff(Day);

Days=zeros(1,150);

for n=1:150;

Days(n)=D-11 + 30.44*(M-8)+365.245*(Y(n)-1999); %equation

end

Part 3 Write a program that estimates all total solar eclipse dates that happened and will happen in the 21st century. In order to do that. Use the following:* a) Use the sample of 6 TSE dates to calculate the average difference in days between any two consecutive TSE. (Hint: To calculate the difference between elements in an array x, you can to use the function diff(x). Use Matlab help to learn more about the function) b) Starting from the last TSE in the last century (August 11, 1999), calculate the next 150 TSE dates. (Hint: You have to use a for loop). Save these dates into a variable in an array form. Do not print them to the command window. Count all TSE's that occur between years 2001 and 2100. Print on the command window how many TSE's do you expect to occur in the 21st century. An answer within 10% accuracy is ok, as long as you justify your answer in part (d) Answer this question below. According to Eclipsewise.com, This century will have 68 total solar eclipses and 7 hybrid eclipses (75 total). Compare your answer in part (c) to this number. How does it compare? ls there an error? If so, what assumptions in this method or in your calculations might be the cause of that error? [Extra credit: +25] What suggestions would you offer to increase the accuracy of this program? No need to write the code, just answer in the appropriate box below.- c) d) e) clc clear Year [2019,2020,2021,2023,2024,2026] Month[7,12,12,4,4,8]: Day[2,14, 4,20, 8,12] Y-2001:1:2100: M-diff (Month) D diff (Day) Days-zeros (1,150) for n-1:150 Days (n,-D-11 + 30.44* (M-81+365.245* (Y (n)-1999); end %equation

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions