Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

MatLab: Urgent Given that October 23 was a Friday, what. day of the week was Oct

ID: 3765488 • Letter: M

Question

MatLab: Urgent

Given that October 23 was a Friday, what. day of the week was October 5? Or October 28? One way to answer correctly is to answer the more general (question: given that a particular day of a particular mouth is a particular day of the week, what day of the week is any other day of that same month? That will be your job for this portion of the assignment. Specifically, write a Matlab function called newdatecellout .m to accomplish this job. Your function should take two input parameters as follows:

Explanation / Answer

Type the following code on matlab save as day.m and run observe the output following is

a=input('enter a date');
x=rem(a,7);
disp(x);
if (x==1)
    disp('thursday');
   elsif (x==2)
   disp('friday');
    elsif x==3
        disp('satur day');
     elsif x==4
        disp('sunday');
   elsif x==5
        disp('monday');
     elsif x==6
        disp('tuesday');
     elsif x==0
        disp('Wednessday');
end