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

plus de 13 ans il y a

A résolu


How to multiply?
* Imagine you are in 3012 Anno Domini, when everyone must learn how to multiply, * and competing for the highly prestigious pos...

plus de 13 ans il y a

A résolu


Cell Array Inception?
Jimmy is a beginning MATLAB student who is trying to read in a text file and build a cell array of strings, where A{k} is the kt...

plus de 13 ans il y a

A résolu


Function Sniffer
* Given a string, * find out which built-in functions are present, * output a simple string, * that has sorted and unique ...

plus de 13 ans il y a

A résolu


Alias abs to asb
Create an alias of a built-in function name. Goal is to alias asb with abs for dyslexic typers. The test suite will be ...

plus de 13 ans il y a

A résolu


Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

plus de 13 ans il y a

A résolu


Four quadrant inverse tangent function.
Create a function that returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tang...

plus de 13 ans il y a

A résolu


R2012b atan in Degrees
Return in degrees the atan result of inputs for all four quadrants. *Examples:* [x, y] Degrees 1 0 0 1 1 ...

plus de 13 ans il y a

A résolu


Compress strings (not springs)
Please remove excess space, limit one space between others, and no space before punctuation marks. * For example, 'Trendy , ...

plus de 13 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 ...

plus de 13 ans il y a

A résolu


Selecting books on MATLAB for experts and beginners (blindfolded)
* Imagine you have been blindfolded and asked to pick up any two books randomly from the table. * There are n books suitable f...

plus de 13 ans il y a

A résolu


Global usage
This Challenge is to utilize Global variables. Global variables are risky as the subroutine may inadvertently and unwantingly...

plus de 13 ans il y a

A résolu


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the ...

plus de 13 ans il y a

A résolu


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

plus de 13 ans il y a

A résolu


McCabe Complexity
The Challenge is to return the McCabe complexity for various functions. One way to determine the McCabe Complexity is to use ...

plus de 13 ans il y a

A résolu


Linear system solve
Solve a linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/linsolv1.pdf

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


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

plus de 13 ans il y a

A résolu


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

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


"Low : High - Low : High - Turn around " -- Create a subindices vector
Let two vectors *lo* and *hi* be given. The job is to create a index vector like so idx = [lo(1):hi(1) lo(2):hi(2) ...]...

plus de 13 ans il y a

A résolu


Siblings of a graphics object
Given a valid, scalar, handle of a graphical object: find the set of all objects that have the same parent as the original that...

plus de 13 ans il y a

A résolu


Piecewise linear interpolation
Given an Mx2 vector and a row of M-1 integers, output a two column vector that linearly interpolates Y times between each succes...

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


fly fly away
A fly moves following a predefined sequence of discrete jumps (defined by the vectors _dx_ and _dy_) repeating the same sequence...

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


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

plus de 13 ans il y a

A résolu


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

plus de 13 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:...

plus de 13 ans il y a

Charger plus