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

meer dan 7 jaar ago

Solved

Make a Palindrome Number

Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

ongeveer 8 jaar ago

Solved

Function Iterator

Given a handle fh to a function which takes a scalar input and returns a scalar output and an integer n >= 1, return a handle f...

ongeveer 8 jaar 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...

ongeveer 8 jaar ago

Solved

the return of the hackathon

You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

meer dan 8 jaar ago

Solved

Hackathon: the beginnings

I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

meer dan 8 jaar 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...

meer dan 8 jaar 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.

meer dan 8 jaar ago

Solved

Balanced number

Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

meer dan 8 jaar 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, ...

meer dan 8 jaar ago

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

meer dan 8 jaar 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 ...

meer dan 8 jaar ago

Solved

Find the longest sequence of 1's in a binary sequence.

Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

meer dan 8 jaar ago

Solved

Quote Doubler

Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...

meer dan 8 jaar ago

Solved

Nearest Numbers

Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...

meer dan 8 jaar 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 ...

meer dan 8 jaar 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...

meer dan 8 jaar ago

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

meer dan 8 jaar 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...

meer dan 8 jaar 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...

meer dan 8 jaar 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 ...

meer dan 8 jaar ago

Solved

Determine if input is odd

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

meer dan 8 jaar 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:...

meer dan 8 jaar ago

Answered

Artificial Neural Network back propagation image classification

In the Neural Network toolbox, each column is a sample, so you need to arrange your input matrix as PxA, and output matrix as 5x...

Artificial Neural Network back propagation image classification

In the Neural Network toolbox, each column is a sample, so you need to arrange your input matrix as PxA, and output matrix as 5x...

meer dan 8 jaar ago | 0

| accepted

Answered

Extract samples with normal distribution from dataset

You could use NCHOOSEK to generate subsets from your dataset with the desired number of samples, and then for each subset run a ...

Extract samples with normal distribution from dataset

You could use NCHOOSEK to generate subsets from your dataset with the desired number of samples, and then for each subset run a ...

meer dan 8 jaar ago | 0

Answered

How to create a dataset array from table?

Hi Alexis You should be able to create a dataset directly from your table, without writing and reading from Excel. Once you h...

How to create a dataset array from table?

Hi Alexis You should be able to create a dataset directly from your table, without writing and reading from Excel. Once you h...

meer dan 8 jaar ago | 0