`Hey,
Note: Brother if you have any queries related the answer please do comment. I would be very happy to resolve all your queries.
clc
clear all
close all
for i=2020:2029
fprintf('Thanksgiving day for %d year is
%d-11-%d\n',i,getDate(i),i);
end
function y=getDate(n)
ct=0;
y=1;
for i=1:30
t = datetime(n,11,i);
d = day(t,'dayofweek');
if(d==5)
ct=ct+1;
end
if(ct==4)
y=i;
return;
end
end
end

Kindly revert for any queries
Thanks.
Use matlab date commands to determine the date of Thanksgiving for the next 10 years (always...
Use Matlab date commands to find out the date of Memorial Day for the next 5 years (always the last Monday in May).
Use your probability knowledge to answer the following questions. What is the probability of Thanksgiving falling on a Friday next year? Please explain your answer. (10 points) What is the probability of Thanksgiving falling on a Thursday next year? Please explain your answer.
Matlab
Provide the MATLAB commands needed to determine the solution to the following system of equations in a MATLAB program (linearequation.m). Use MATLAB to check the solution by multiplying coefficient matrix A with the solution vector x, to produce b. That is, Ax = b. w + 3x + 4y = 31 2w + x + 3y + z = 27 9x + 7y + 2z = 72 4w + 3x + 2y + 2z = 27.
PLEASE USE MATLAB COMMANDS THANK YOU
Use Matlab to graph the functions f(x) = 3xsin(3x) and g(x)= 12 - 2x² so that you can read off the point(s) of intersection (if any), accurate up to two decimal places. 1) Write down the Matlab command(s) you used to create the x-vector. 2) Write down the Matlab command(s) you used to produce the vectors containing the f- and g-function values. 3) Write down the Matlab command(s) you used to plot the graphs....
For all questions, write commands in Matlab (or Octave) that
you would use to solve the exercises, not the result.
For all exercises, you must write the commands that you would use to solve them, not the result 1. Compute sin(/5), e2v17 +4.(-33) 2. Write an anonymous function with the formula f) sin 2 3. 3. Write the function above so that it can be applied to vectors of arguments 4. Graph the function from-5 to 5 How would you...
Exercise 1: Use Matlab command to obtain the following a) Extract the fourth row of the matrix generated by magic(6) b) Show the results of 'x' multiply by 'y' and 'y' divides by 'x'. Given x = [0:0.1:1.1] and y=[10:21] c) Generate random matrix 'r' of size 4 by 5 with number varying between -8 and 9 Exercise 2: Use MATLAB commands to get exactly as the figure shown below x=pi/2:pi/10:2*pi; y=sin(x); z=cos (x);
Please do part C only, thank you.
Exercise 1 (Transfer Function Analysis) MATLAB provides numerous commands for working with polynomials, ratios of polynomials, partial fraction expansions and transfer functions: see, for example, the commands roots, poly, conv, residue, zpk and tf (a) Use MATLAB to gener ate the continuous-time transfer function H5+15)( +26(s+72) s(s +56)2(s2 +5s +30) H(s) displaying the result in two forms: as (i) the given ratio of factors and (ii) a ratio of two polynomials. (b) Use...
3. (3 points) Write the sequence of MATLAB commands that you would use to produce a plot depicting the rotini-like surface defined by: for radii (r) going from 0 to 1 (21 values) and angles (θ) going from-10π to 10π (501 values). Your sequence of commands should define rectangular grids of radii and angles, transform them to cartesian coordinates (x.y), compute z, and plot the result as a solid surface, without gridlines (use shading command), with equally scaled x, y...
This is matlab questions,please use Julia and give me Julia
commands process to slove the questions.
(3) Find an interval [a,b] on which f(x) = x cos(x) and gle) = 7 / 7 satisfies g(x)=f(). Your interval must be in [0,2]. have endpoints accurate to the nearest thousandth, and be as large as possible. Construct a graph showing both fanda on [o, 2] and on which your interval is. visible. (2) Let g(x) = x'+1+56 log 14-3x). The function has...
Need help with this MatLab exercise. Please show all commands in
MatLab.
Enter the following matrices and vectors in MATLAB [ 2 -6 3 ] [ 5 ] -3 A= 2 -7 -2 , B= 2 -2 -3 , b= -13 , c= 3 -1 4], d= 0 [ 7 -2 7 [1 -8 -1 ] [ 10 (a) Perform the following operations: AB, BA, CA and Bd (use standard linear algebra multiplication). - 3 (b) Construct a 6 x...