Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...
3년 이상 전
해결됨
Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
3년 이상 전
해결됨
Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...
Area of square
find the area of the square, whose length of diagonal is given as x.
3년 이상 전
해결됨
Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...
3년 이상 전
해결됨
Summing digits
Given n, find the sum of the digits that make up 2^n.
Example:
Input n = 7
Output b = 11
since 2^7 = 128, and 1 + ...
3년 이상 전
해결됨
Function definition: Volume of a pyramid
Define a function CalculatePyramidVolume with inputs baseLength, baseWidth, and pyramidHeight. The function returns pyramidVolum...
Double colon operator: Increment by x
* Construct a row array countValues from 0 to 25, elements incremented by incrementValue.
Ex: If incrementValue is 5, countVa...
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.