Solved

Find the numeric mean of the prime numbers in a matrix.

There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

6 meses ago

Solved

Volume of a box

Given a box with a length a, width b, and height c. Solve the volume of the box.

6 meses ago

Solved

Basic commands - amount of inputs

Make a function, which will return amount of given inputs Example: amountinput(1,2,4,3,10) -> 5 , because we gave functio...

6 meses ago

Solved

Is my wife right? Now with even more wrong husband

Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

6 meses ago

Solved

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 + ...

6 meses ago

Solved

Weighted average

Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6 meses ago

Solved

The Hitchhiker's Guide to MATLAB

Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

6 meses ago

Solved

create a square matrix

create a [n*n] matrix. example: mat(4)= [ 1 4 9 16 4 4 9 16 9 9 ...

6 meses ago

Solved

Form a square matrix from four square sub-matrices

Create a square matrix, y, from 4 square sub-matrices that will be constructed (x1, x2, x3, x4): y = [x1 x2; x3 x4]; ...

6 meses ago

Solved

Bullseye Matrix

Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

6 meses ago

Solved

Fibonacci sequence

Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

6 meses ago

Solved

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...

6 meses ago

Solved

Remove any row in which a NaN appears

Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

6 meses ago

Solved

Make a checkerboard matrix

Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

6 meses ago

Solved

Find all elements less than 0 or greater than 10 and replace them with NaN

Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

6 meses ago

Solved

Pizza!

Given a circular pizza with radius _z_ and thickness _a_, return the pizza's volume. [ _z_ is first input argument.] Non-scor...

6 meses ago

Solved

Determine if input is odd

Given the input n, return true if n is odd or false if n is even.

6 meses ago

Solved

Dice face matrix!

This is dice simulator, but instead of making a random die number, you will receive an "pre-rolled" number in and spit out a mat...

6 meses ago

Solved

Make a diamond

Given n, odd number > 1, return n by n matrix consist of "null" and "*" characters arranged like a diamond. No toolbox funct...

6 meses ago

Solved

Dimensions of a rectangle

The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

6 meses ago

Solved

Is this triangle right-angled?

Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

6 meses ago

Solved

Area of an Isoceles Triangle

An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

6 meses ago

Solved

Find a Pythagorean triple

Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

6 meses ago