A résolu


Path of least resistance
Find the length of the shortest path through the matrix from the top left to bottom right corner. You may move right, down, or d...

plus de 13 ans il y a

A résolu


Find Index of maximum Value and maximum Value of a vector
Find the Index of the first occurrence of the maximum value in a vector and also the maximum value in the vector. Example: [...

plus de 13 ans il y a

A résolu


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

plus de 13 ans il y a

A résolu


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

plus de 13 ans il y a

A résolu


Robust alignment of coordinate system
We have to create a custom 3-D coordinate system of which one axis is defined by a vector (in the global coordinate system). The...

plus de 13 ans il y a

A résolu


Make a KITT-scanner on the command line
Did you know that you can actually remove characters from the command-line window? Just send a 'backspace' character to the outp...

plus de 13 ans il y a

A résolu


Create a "map" of 2D wavelet coefficients
Generate a matrix that for an image of size r*2^S by c*2^S indicates index of the wavelet subbands after <http://en.wikipedia.or...

plus de 13 ans il y a

A résolu


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

plus de 13 ans il y a

A résolu


Set a diagonal
Given a matrix M, row vector v of appropriate length, and diagonal index d (where 0 indicates the main diagonal and off-diagonal...

plus de 13 ans il y a

A résolu


Penny Flipping: Reverse subsets of a sequence of coins until you recover the original configuration
The original Penny Flipping Problem (PF-1) starts with a stack of N pennies arranged with all the coins heads up. The first oper...

plus de 13 ans il y a

A résolu


Unique values without using UNIQUE function
You must return unique values in a vector in *stable* mode without using the unique function. About stable order flag: ...

plus de 13 ans il y a

A résolu


Bisection method of finding a root.
Test the bisection algorithm described in Chapter 5 of Steven C. Chapra's textbook, *Applied Numerical Methods with MATLAB for E...

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

plus de 13 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

Problème


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

presque 14 ans il y a | 2 | 277 solveurs

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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!

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

A résolu


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

presque 14 ans il y a

Charger plus