A résolu


Add a row of zeros on top of a matrix
Given a matrix, insert a row of zeros as the top row.

environ 12 ans il y a

A résolu


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

environ 12 ans il y a

A résolu


It's race time! Write a faster function than the test suite call of unique().
Write a function to get unique elements of a vector faster than unique()! Input will be a vector (of integers or floating point ...

environ 12 ans il y a

A résolu


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

environ 12 ans il y a

A résolu


convert matrix to single column
given any matrix, convert it to single column

environ 12 ans il y a

A résolu


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

environ 12 ans il y a

A résolu


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

environ 12 ans il y a

A résolu


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

environ 12 ans il y a

A résolu


is this number Munchhausen Narcissistic?
in this problem, simply return 1 if a supplied number is Munchhausen narcissistic or 0 if not. eg 153 is narcissistic but not...

environ 12 ans il y a

A résolu


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

environ 12 ans il y a

A résolu


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

environ 12 ans il y a

A résolu


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

environ 12 ans il y a

A résolu


Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

environ 12 ans il y a

A résolu


Wind outward from the center ...
Create an n-by-n matrix with elements ranging from 1 to n^2 in a rectangular spiral pattern. Example if n = 5 : 21 ...

environ 12 ans il y a

A résolu


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

environ 12 ans il y a

A résolu


Frobenius Norm
Write your own version of Frobenius Norm without using the 'norm' function.

environ 12 ans il y a

A résolu


Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...

environ 12 ans il y a

A résolu


subtract central cross
Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

environ 12 ans il y a

A résolu


Create an 'arrow-head" matrix
Write a function that when given an odd number, produces an arrow-head function pointing to the right. Examples n = 3 ...

environ 12 ans il y a

A résolu


Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

environ 12 ans il y a

A résolu


create a circulant matrix
create a circulant matrix

environ 12 ans il y a

A résolu


The Dark Side of the Die
It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

environ 12 ans il y a

A résolu


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

environ 12 ans il y a

A résolu


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

environ 12 ans il y a

A résolu


Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima. For example, x= [1 12 3 2 7 0 3 1 19 7]; ...

environ 12 ans il y a

A résolu


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

environ 12 ans il y a

A résolu


sinus function
x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

environ 12 ans il y a

A résolu


Proper Factors
Generate the proper factors of input integer _x_ and return them in ascending order. For more information on proper factors, ref...

environ 12 ans il y a

A résolu


Determine if input is a perfect number
A <http://en.wikipedia.org/wiki/Perfect_number/ perfect number> occurs whent the sum of all divisors of a positive integer, exce...

environ 12 ans il y a

A résolu


Nilpotent matrix
Check if matrix A is <http://mathworks.com/ nilpotent>.

environ 12 ans il y a

Charger plus