A résolu


Determine the Anti-diagonal of a Magic Square
Determine the anti-diagonal (crossing from top right to lower left) of a magic square of size n. Examples If n = 3 y =...

plus de 11 ans il y a

Problème


Yet Another Path Finder
Assume there is a rectangular grid of points. These points are indicated by linear indices in a MATLAB-fashion. Some of the grid...

plus de 11 ans il y a | 1 | 32 solveurs

A résolu


Polite numbers. N-th polite number.
A polite number is an integer that sums of at least two consecutive positive integers. For example _7 = 3+4_ so 7 is a polite...

plus de 11 ans il y a

A résolu


Lowest sum from a group of digits
Hi there. It's James's daughter here again, and my third grade math teacher is up to her old tricks. This time, she's giving u...

plus de 11 ans il y a

A résolu


Check if it is a square or cube of consecutive numbers
Check whether the element of given row vector is a square or cube of consecutive numbers. For example Input x=[4 27 16 25 ...

plus de 11 ans il y a

A résolu


It's race time again! Write a function that is at least twice as fast as the test suite call of repmat().
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. This must be done in l...

plus de 11 ans il y a

A résolu


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

plus de 11 ans il y a

A résolu


counting for loop
Complete the function below using a for loop to count from 3 to N by 2. For example, if N is 10, count 3, 5, 7, 9 and stop. Fo...

plus de 11 ans il y a

A résolu


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

plus de 11 ans il y a

A résolu


Matrix spiral
Make a spiral in a (n*n) matrix. The spiral has to start in the top left, and has to rotate clockwise to the center. The spiral ...

plus de 11 ans il y a

A résolu


Identify Reachable Points
Given a vector of 2-D Points and a vector of 2-D Deltas create an array of all Locations that can be reached from the points usi...

plus de 11 ans il y a

A résolu


Broken numlock key, oppps !
The numlock key on my computer is pressed and is now broken, so I cant press it to switch off the numlock mode. And hence I am n...

plus de 11 ans il y a

A résolu


Method of Common Differences part-2
This is the inverse problem to <http://www.mathworks.com/matlabcentral/cody/problems/1485 Problem 1485>. Problem 1485 illustra...

plus de 11 ans il y a

A résolu


English to Pig Latin Translator
Pig latin is a faux-language based off of English. The rules are as follows (excerpted from the wikipedia entry for Pig Latin): ...

plus de 11 ans il y a

A résolu


Reduce - Map-Reduce
Write reduce function, that takes arguments and constantly folds results into next call argument, finally returning a value; ...

plus de 11 ans il y a

A résolu


Legendre polynomials
Given an integer _n_ &ge; 0, generate the _n_-th <http://en.wikipedia.org/wiki/Legendre_polynomials Legendre polynomial>. *Ex...

plus de 11 ans il y a

A résolu


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

plus de 11 ans il y a

Problème


Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...

plus de 11 ans il y a | 7 | 254 solveurs

A résolu


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

plus de 11 ans il y a

A résolu


Functional inputs
Return an n-dimensional array whose elements are the results of a function over a set of vectors. The (i,j,k, ...n)th element...

plus de 11 ans il y a

A résolu


Formatting currency numbers
Given a number, format it properly for textual display using the notation $xxx,xxx,xxx.xx. Assume that no more than two digits ...

plus de 11 ans il y a

A résolu


Double Deal
*Description* Given an input vector _v_, return the first element as the first output, the second element as the second outpu...

plus de 11 ans il y a

A résolu


Find out value of polynomial at different value.
Find out value of polynomial at different value. Example p(s) = s + 8 For s=0, value is 8.

plus de 11 ans il y a

A résolu


Find out the Gray Code for a Given Binary Number
Find out <http://en.wikipedia.org/wiki/Gray_code Gray Code> for a given binary number Example Binary input 1000 Gray ...

plus de 11 ans il y a

A résolu


Gamma Function
Evaluate the <http://en.wikipedia.org/wiki/Gamma_function/ Gamma Function>. Gamma_val(0) = Inf Gamma_val(1.2) = 0.9182

plus de 11 ans il y a

A résolu


Find out characteristics equation of given matrix.
Find out characteristics equation of given matrix. A=[0 2; 1 8] then char. eq is s^2-8*s-2=0 and answer should be [1 -8 -2] ...

plus de 11 ans il y a

A résolu


Did you say please? - Find one string within another without strfind or regexp/regexpi
For a given string sentence, determine if the string word 'please' is present or not. If so, return the string 'OK', else return...

plus de 11 ans il y a

A résolu


Concatenate string with cell array of strings
Given a cell array of strings (a), a target string (b), and a target position (ind), return a cell array of strings (c) in which...

plus de 11 ans il y a

A résolu


Partial sorting algorithm
Return the top k elements of an input vector. A comparison function compareFcn(m,n) is provided to compare individual elements o...

plus de 11 ans il y a

A résolu


What is the scope of variables in Matlab ?
How to do this little hack ? a=10; b=5; y=change_var(a,1); assert(isequal(a,1))

plus de 11 ans il y a

Charger plus