Gelöst


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

fast 10 Jahre vor

Problem


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

fast 10 Jahre vor | 1 | 28 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Problem


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

fast 10 Jahre vor | 7 | 197 Lösungsvorschläge

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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.

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Gelöst


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

fast 10 Jahre vor

Mehr laden