Solved


MATLAB Counter
Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

5 years ago

Solved


Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

5 years ago

Solved


Breaking Out of the Matrix
Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

5 years ago

Solved


The Top 5 Primes
This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

5 years ago

Solved


I Plead the Fifth
Write a function to provide a yes or no answer to the input string. However, it must plead the 5th amendment (return an empty st...

5 years ago

Solved


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

5 years ago

Solved


Is this is a Tic Tac Toe X Win?
For the game of <https://en.wikipedia.org/wiki/Tic-tac-toe Tic Tac Toe> we will be storing the state of the game in a matrix M. ...

5 years ago

Solved


Inscribed Pentagon?
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

5 years ago

Solved


Circle/Pentagon Overlap
Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

5 years ago

Solved


Octoberfest festival
A group of students decided to visit Octoberfest festival. First they ordered one beer, then after half-hour they taken one more...

5 years ago

Solved


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

5 years ago

Solved


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

5 years ago

Solved


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

5 years ago

Solved


Polarisation
You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

5 years ago

Solved


Missing five
Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

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

5 years ago

Solved


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

5 years ago

Solved


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

5 years ago

Solved


Five-dimensional maze
*Description* The traditional maze is 2-dimensional: the navigator can move in the positive or negative directions along two ...

5 years ago

Solved


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

5 years ago

Solved


X O X O
On a noughts and crosses board, how many possible unique combinations are there given a square grid of length n? Assumptions/...

5 years ago

Solved


Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive integer MATLAB can handle.

5 years ago

Solved


One track five lanes
Find the minimum number of lane changes necessary to cross the entire track without running into any obstacles <<http://www.a...

5 years ago

Answered
Too many input arguments
You are right, when you call a method of an object with the . notation, that object is considered as the first input. This is no...

5 years ago | 1

Solved


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

5 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

5 years ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

5 years ago

Solved


Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

5 years ago

Solved


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

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

5 years ago

Load more