A résolu


Can you beat the lottery?
Well this one you may not get every time, but it is a lottery! Here is the code that generates the lottery numbers (you can try ...

presque 13 ans il y a

A résolu


Now 20% off!
Furloughs are hitting government workers this year. To commemorate getting one unpaid day off each week until the end of Septem...

presque 13 ans il y a

A résolu


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

presque 13 ans il y a

A résolu


Get ranks of values in a vector
For a given vector, say [6 3 8 2], return the ranks (ascending) of observations, i.e. [3 2 4 1]. Do not worry about tied ranks. ...

presque 13 ans il y a

A résolu


Find the Kronecker Tensor Product without using KRON
The Kronecker Tensor Product is the result of multiplying all elements of a matrix with each of the elements of another matrix. ...

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

presque 13 ans il y a

A résolu


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

presque 13 ans il y a

A résolu


Spot the rectangle
This problem is related to the <http://bit-player.org/2009/the-17x17-challenge 17x17 challenge>. Given a matrix filled with ones...

presque 13 ans il y a

A résolu


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

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

presque 13 ans il y a

A résolu


Make a Star Pyramid
Create a star pyramid. First line will have 1 star, second will have two stars and so on... a basic program which is easily done...

presque 13 ans il y a

A résolu


Nonuniform quantizer as a piecewise constant function
Implement a nonuniform quantizer as the following piecewise function: y = -3.5, x < 3 y = -1.5, -3 &#8804; x < -1 y = -...

presque 13 ans il y a

A résolu


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

presque 13 ans il y a

A résolu


NO _________ ALLOWED....
So you're given a sentence where if there is a particular word in the sentence then the output is 1, if it is not there then the...

presque 13 ans il y a

A résolu


Find names/words that start and end with the same letter.
Find names/words (from a string) that start and end with the same letter. * Case-insensitive. * If a name/word is not at the...

presque 13 ans il y a

A résolu


Wheat on a chessboard pt 1
If a chessboard were to have wheat placed upon each square such that one grain were placed on the first square and each successi...

presque 13 ans il y a

A résolu


Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

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

presque 13 ans il y a

A résolu


Monty Hall
The classic Monty Hall "Let's Make a Deal" final showcase puzzle pits the contestant against three Doors. Behind one Door are dr...

presque 13 ans il y a

A résolu


Pythagorean perfect squares: find the square of the hypotenuse and the length of the other side
Given the square root of a square number, *seed*, and a range, *n*, find the square number, *Z* as well as the other side, *y*, ...

presque 13 ans il y a

A résolu


Is this date a palindrome?emordnilap a etad siht sI
Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date ...

presque 13 ans il y a

A résolu


chirp again
rise frequency linearly from 0 to frequency f in 1 second and fs samples, initial amplitude must rise smoothly like an aircraft ...

presque 13 ans il y a

A résolu


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

presque 13 ans il y a

A résolu


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

presque 13 ans il y a

A résolu


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

presque 13 ans il y a

A résolu


Negative matrix
Change the sign of all elements in given matrix.

presque 13 ans il y a

A résolu


calculate RMS voltage
given peak to peak voltage, calculate rms voltage

presque 13 ans il y a

A résolu


Average of square wave
given positive and negative peak , calculate dc level, 50% duty cycle

presque 13 ans il y a

A résolu


edge detection
write a function that gives the indexes of rising or falling edge x is a vector (assume it contains always at least one eleme...

presque 13 ans il y a

A résolu


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

presque 13 ans il y a

Charger plus