解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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.

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


create a circulant matrix
create a circulant matrix

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

解決済み


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

約12年 前

さらに読み込む