Find max
Find the maximum value of a given vector or matrix.
4 months ago
Solved
Calculate area of sector
A=function(r,seta)
r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...
4 months ago
Solved
Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.]
Non-scored bonus...
4 months ago
Solved
Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...
4 months ago
Solved
Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example:
[q,r] = swap(5,10)
returns q = ...
4 months ago
Solved
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
4 months ago
Solved
Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because
6 = 1 + 2 + 3
which can be displayed ...
4 months ago
Solved
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...