已解决


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

12 years 前

已解决


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

12 years 前

已解决


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

12 years 前

已解决


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

12 years 前

已解决


Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

12 years 前

已解决


Find and replace the zero array in a matrix
Find the zero array in the matrix and replace it with average of surrounding (adjacent) arrays. Example: A = 3 ...

12 years 前

已解决


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

12 years 前

已解决


Three...is a magic number.
Yes it is... It's a magic number... To help you get rid of that earworm, here's a new Cody problem. You are given a squar...

12 years 前

已解决


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

12 years 前

已解决


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

12 years 前

已解决


Positive Infinity
Round the array a towards positive infinity

12 years 前

已解决


Return the names and values of the input arguments of a function
Given a function name, return the names and values of the input arguments. e.g. function_name(arg1, arg2) is a function de...

12 years 前

已解决


Wayfinding 1 - crossing
This is the first part of a series of assignments about wayfinding. The final goal is to be able to calculate the fastest route ...

12 years 前

已解决


Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

12 years 前

已解决


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

12 years 前

已解决


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

12 years 前

已解决


Order of things - 2
This problem is closely related to <http://www.mathworks.nl/matlabcentral/cody/problems/2189-order-of-things-1 Problem 2189, Ord...

12 years 前

已解决


Mysterious digits operation (easy)
What is this digit operation? 0 -> 0 1 -> 9 121 -> 9 44 -> 6 15 -> 5 1243 -> 7 ...

12 years 前

已解决


Order of things - 1
Let's assume you have a number of calculations to perform, that depend on each other. E.g. 'A' can be calculated, once the outco...

12 years 前

已解决


Polynomial Multiplication
Multiply two polynomial equation.Given polynomial coefficients a and b.

12 years 前

已解决


GJam 2012 Qualifier: Tongues
This Challenge is a Warm-Up for <http://code.google.com/codejam/schedule.html Google Code Jam 2014> Qualifying round coming up o...

12 years 前

已解决


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence ca...

12 years 前

已解决


Slicing the cube
A bored matlab enthusiast has a cube with volume n^3. He decides to paint the entire surface of the cube red. Then, with slices...

12 years 前

已解决


Which way to go?
Given an m*n grid, How many ways are there to go from upper left corner to the lower right one? You can only move right...

12 years 前

已解决


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstr...

12 years 前

已解决


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

12 years 前

已解决


Delete the rows in the middle
We will delete the rows in the middle and keep the first and the last rows. For example if input is [1 2 1 7 1 8 ...

12 years 前

已解决


The 17x17 Problem
This problem is sometimes referred to as the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. See also <http://...

12 years 前

已解决


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

12 years 前

已解决


Largest territory
Determine whose territory is largest. If there are two more large territory, determine a smaller number. For example, X ...

12 years 前

加载更多