A résolu


Exact binary matrix factorization
Given a binary-valued (only ones and zeroes) MxN matrix C, and K (where K<M and K<N) find a binary-valued MxK matrix A and a bin...

plus de 11 ans il y a

A résolu


What's Your BMI?
Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

plus de 11 ans il y a

A résolu


Get an array of month-ends in a date range
Create a function that would return a list of month-ends falling in a given date range. If a start date or end date falls on a...

plus de 11 ans il y a

A résolu


Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

plus de 11 ans il y a

A résolu


Operate on matrices of unequal, yet similar, size
You may want to add a vector to a matrix, implying that the vector is added to each column of the matrix. Or multiply a 3x4x5 ma...

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

plus de 11 ans il y a

A résolu


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

plus de 11 ans il y a

A résolu


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

plus de 11 ans il y a

A résolu


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

plus de 11 ans il y a

A résolu


Solving a quadratic equation
Given a, b ​​and c, Return the solution of the following quadratic equation: a*x^2 + b*x + c = 0.

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

plus de 11 ans il y a

A résolu


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

plus de 11 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 11 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 11 ans il y a

A résolu


Implement Solitaire cipher for N long deck.
Implement the <http://en.wikipedia.org/wiki/Solitaire_(cipher) solitaire cypher>. Given a starting permutation of numbers [1:...

plus de 11 ans il y a

A résolu


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

plus de 11 ans il y a

A résolu


Decimal Comparison
*Background* A utility of particular interest to Cody and other MATLAB ventures is comparing the equality of two numbers. In ...

plus de 11 ans il y a

A résolu


Functionality 1
It's all about functionality. *Cheating is allowed but not required*

plus de 11 ans il y a

A résolu


Justify the character string in center with proportional fonts
how to justify a string of character into center with proportional fonts? Example: x='justify string ' output is ' justif...

plus de 11 ans il y a

A résolu


AVIRIS Hyperspectral Bit Mask
The AVIRIS data sometimes is provided uncropped. This creates edge regions with values of "-50". Shown is AVIRIS Moffett Field i...

plus de 11 ans il y a

A résolu


Convert a structure into a string
Convert the contents of each fields into a string. Example with an input structure s with 2 fields : s.age = '33' s....

plus de 11 ans il y a

A résolu


Gambler?
Given a handle to a wealth function, confirm within 100 milliseconds 'Millionaire', 'Likely', or 'Gambler', if wealth() returns ...

plus de 11 ans il y a

A résolu


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

plus de 11 ans il y a

A résolu


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

plus de 11 ans il y a

A résolu


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

plus de 11 ans il y a

A résolu


Column norms of a matrix
Given a matrix M, return a vector y such that for each k y(k)=norm(M(:,k)) (y(k) is the Euclidean norm of the k-th col...

plus de 11 ans il y a

A résolu


Find perfect placement of non-rotating dominoes (easier)
Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

plus de 11 ans il y a

A résolu


Rotate and display numbered tile
Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

plus de 11 ans il y a

A résolu


Find best domino orientation
Given a list of pairs, find the orientation they should be placed in a line, such that the sum of the absolute values of the dif...

plus de 11 ans il y a

A résolu


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

plus de 11 ans il y a

Charger plus