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

oltre 6 anni ago

Solved

Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

oltre 6 anni ago

Solved

Genome Sequence 004: Long 3rd Generation Segment Correction
The Melopsittacus undulates genome, Parrot Budgerigar, was successfully sequenced in July 2012 using long 3rd Gen sequences prov...

oltre 6 anni ago

Problem

Get me! v3
A harder version of Get me! I *think* I only left one door open.. we could be close to a perfect anti-cheating engine,

oltre 6 anni ago | 4

Solved

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

oltre 6 anni ago

Solved

Pull the variable y_correct from the Caller's Workspace
*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

oltre 6 anni ago

Solved

Hack not this Test Suite you will
Another Hack 10000 Challenge. I am thinking of an integer between 1 and 10000. Return a value between 1 and 10000. I ma...

oltre 6 anni ago

Problem

Get me! v2
Exploiting cody v2

oltre 6 anni ago | 1

Solved

De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

oltre 6 anni ago

Solved

Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

oltre 6 anni ago

Solved

Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

oltre 6 anni ago

Solved

Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

oltre 6 anni ago

Solved

Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

oltre 6 anni 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. Example...

oltre 6 anni 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...

oltre 6 anni 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]; and ...

oltre 6 anni 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:...

oltre 6 anni 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 + ...

oltre 6 anni ago

Solved

Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

oltre 6 anni ago

Solved

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

oltre 6 anni ago

Solved

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

oltre 6 anni 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 ...

oltre 6 anni 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 ...

oltre 6 anni ago

Problem

Get me!
Inspired by Now! problems. Do your best!

oltre 6 anni ago | 1

Solved

Now! (Anticheating version 1)
By now, _Problem 901. Now!_ has not been solved without the use of cheats or hacks. <http://www.mathworks.com/matlabcentral/c...

oltre 6 anni ago

Solved

What's going on here?

oltre 6 anni 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...

oltre 6 anni ago

Problem

What's going on here?

oltre 6 anni ago | 1

Solved

Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

oltre 6 anni ago

Solved

Metamorphosis
Inspired by problem <http://www.mathworks.com/matlabcentral/cody/problems/866-community-problem-500 866>. Can you make your c...

oltre 6 anni ago