Community Profile

28 total contributions since 2017

View details...

Contributions in
View by

Solved

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

etwa 2 Jahre ago

Solved

Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

etwa 2 Jahre ago

Solved

Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

etwa 2 Jahre ago

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

etwa 2 Jahre 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...

etwa 2 Jahre 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...

etwa 2 Jahre ago

Solved

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

etwa 2 Jahre 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 displa...

etwa 2 Jahre 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...

etwa 2 Jahre ago

Solved

Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

etwa 2 Jahre ago

Solved

Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

mehr als 2 Jahre ago

Solved

Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

mehr als 2 Jahre ago

Solved

Calculate the sum of two numbers. Example input = [2 3] output = 5

mehr als 2 Jahre ago

Solved

Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

mehr als 2 Jahre ago

Solved

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

mehr als 2 Jahre ago

Solved

Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

mehr als 2 Jahre ago

Solved

multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

mehr als 2 Jahre ago

Solved

Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

mehr als 2 Jahre ago

Solved

Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

mehr als 2 Jahre ago

Solved

Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

mehr als 2 Jahre ago

Solved

Return area of square
Side of square=input=a Area=output=b

mehr als 2 Jahre ago

Solved

Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

mehr als 2 Jahre ago

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

mehr als 2 Jahre ago

Solved

Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

mehr als 2 Jahre ago

Solved

Given a and b, return the sum a+b in c.

mehr als 2 Jahre 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...

mehr als 2 Jahre ago

Solved

Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

mehr als 2 Jahre 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...

mehr als 2 Jahre ago