1. A square-based pyramid has the volume V. If the verticalheight is H (the normal distance from the square base to thepoint), write a MATLAB function that:
has V and H as input arguments
calculates the length of the side of the square (S)
has S as an output argument
Write MATLAB code that tests the function for the values:
V = 10 m3 and H = 2 m.
V = 2.586×106 m3 and H = 146.6 m (theoriginal dimensions of the Great Pyramid of Giza).
2. Repeat SPIDER 2 Q1, but write a function that accepts a yearas an input argument and determines whether that year is a leapyear. The output should be the variable extra_day, which should be1 if the year is a leap year and 0 otherwise.
You must write a script file that thoroughly tests whether yourfunction works correctly.