已解决


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

14 years 前

已解决


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

14 years 前

已解决


Cell Source Index
Suppose that C is a cell array whose elements consist of row vectors of elements of the same type. For example, C could be a ce...

14 years 前

已解决


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

14 years 前

已解决


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

14 years 前

已解决


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

14 years 前

已解决


"mirror" matrix
Create n x 2n "mirror" matrix of this type: e.g. for n = 2 m = [1 2 2 1;1 2 2 1] e.g. for n = 3 m = [1 2 3 3 2 1...

14 years 前

问题


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

14 years 前 | 2 | 279 个解题者

已解决


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

14 years 前

已解决


Rearrange coefficients after block based DCT transform.
Two dimensional block-based discrete cosine transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II (DCT-II)> i...

14 years 前

已解决


1D DCT-II transform.
Implement a function that calculates 1D Discrete Cosine Transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II...

14 years 前

已解决


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

14 years 前

已解决


Number of Horns on a unicorn!
Calculate the number of horns on a *unicorn*! And I'm talking about a unicorn with not more than one horn on it!

14 years 前

已解决


Find the repeating decimal pattern!
Write a function that takes one double input value and returns only the repeating decimal, if any, as a string. Only decimals f...

14 years 前

已解决


Finite Continued Fraction
Given an input real number x and a natural number n, output the row vector with the n first terms of the continued fraction. F...

14 years 前

已解决


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

14 years 前

已解决


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

14 years 前

已解决


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

14 years 前

已解决


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

14 years 前

已解决


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

14 years 前

已解决


Without french accent please !
Suppress french accent For example 'Déjà présent' -> 'Deja present'

14 years 前

已解决


How many monitors are connected ?
How to obtain the numbers of monitors connected to your computer ?

14 years 前

已解决


Return a list sorted by number of consecutive occurrences
Inspired by Problem 38 by Cody Team. Given a vector x, return a vector y of the values in x sorted by the number of CONSECUTIVE...

14 years 前

已解决


Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...

14 years 前

已解决


Figurate number triangle
Check whether the input matrix is a figurate number triangle: <http://mathworld.wolfram.com/FigurateNumberTriangle.html>

14 years 前

已解决


Least common multiple of many numbers
1:6 -> 60

14 years 前

已解决


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

14 years 前

已解决


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

14 years 前

已解决


N-Queens Checker
Picture a chessboard populated with a number of queens (i.e. pieces that can move like a queen in chess). The board is a matrix,...

14 years 前

已解决


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

14 years 前

加载更多