A résolu


Fermat primes
Historical context The french mathematician Pierre de Fermat found the formula to find some prime numbers. He thought / co...

20 jours il y a

A résolu


Euler primes
Historical context The great swiss mathematician Leonhard Euler found the formula P(n) = n^2 + n + 41 to give some prime nu...

21 jours il y a

A résolu


Primes numbers which are the difference of two consecutive cubes
Problem statement Given a positive integer n greater than 2, find the prime numbers less or equal to n and which are the diff...

21 jours il y a

A résolu


Find the first occurence of a given gap between two consecutive prime numbers
Problem statement Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. E...

21 jours il y a

A résolu


Frequencies of prime gaps
Given two positive integers n and , write a function which computes the frequency of the gap between two consecutive of the pr...

23 jours il y a

A résolu


Breaking up a chocolate bar
You've got a chocolate bar of size , and you want to break it up into bite-sized () pieces. How many steps are required to do th...

24 jours il y a

A résolu


Insert certain elements into a vector.
We start with vector V. Some values W will be inserted into V, at positions U. Say, |V| contains |[1 2 3 4 5]| and |W| is |[0...

27 jours il y a

A résolu


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

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

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

27 jours il y a

A résolu


Under the sea: Snell's law & total internal reflection
<https://en.wikipedia.org/wiki/Snell's_law> When a light travels from one medium to another medium, depending on the refracti...

27 jours il y a

A résolu


Laguerre Polynomials
Create a square lower diagonal matrix containing the first n Laguerre Polynomial coefficients. For n=6, the Laguerre Matrix is: ...

27 jours il y a

A résolu


Cookie Cutters
Given a larger and smaller matrix, perform element-by-element multiplication on the smaller matrix and a sub-matrix of the large...

27 jours il y a

A résolu


Assign numerical values to a structure with 1 field
The aim is to assign values to a multidimensional structure *without using for-loop or while-loop* Example with a structure ...

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

27 jours il y a

A résolu


Find all the zeros of sinus , cosinus and tangent in a given interval
The aim is to find all the zeros of a function within an interval. *Input* : * fcn : an anonymous function (@sin, @cos......

28 jours il y a

A résolu


Cody Computer Part 1 - Guess the system font used by uipanel
list = listfonts return the list of available system fonts. Can you guess which font is used for uipanel on the CODY computer...

28 jours il y a

A résolu


Cody Computer Part 2 - Get the license number of Cody Computer
In the Cody computer investigation party, you may have already solved : <http://www.mathworks.com/matlabcentral/cody/problems...

28 jours il y a

A résolu


2D - Mean Filter
Assume you are given an "image" matrix of size NxM. Reduce the image noise by implementing a mean filter window of size 9 (a 3x3...

28 jours il y a

A résolu


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

28 jours il y a

A résolu


wait for me
wait exactly x seconds please, need not be more than 2 seconds but must be accurate within say 50 milliseconds, your function mu...

28 jours il y a

A résolu


Beauty of Parentheses
Given a string consisting of closed parentheses, form a string array in the following way so that the orders of these parenthese...

29 jours il y a

A résolu


Fermat's last theorem - again
For a given integer n, express it as a sum of two squares if possible. Return empty matrix otherwise. Solution may not be unique...

29 jours il y a

A résolu


How many hours are there in a day in Italy?
Remember "European Summer Time"

29 jours il y a

A résolu


Musical Note Interval 1 - Diatonic Scale
Assuming a simple diatonic C scale, calculate the interval (integer) between two notes (provided as strings). By applying number...

29 jours il y a

A résolu


Classify triangles as acute, obtuse, or right
In an acute triangle, the three interior angles are acute, or smaller than 90 degrees. In an obtuse triangle, one angle is obtus...

29 jours il y a

A résolu


Calculate trends in time series
Create a new variable that has trends in input series. If _t+1_ is bigger than or equal to _t_, than trend in _t_ will be 1, oth...

30 jours il y a

A résolu


Compute the antisigma function
The sum of divisors function, or , is the sum of the numbers that divide . The antisigma function is the sum of numbers less tha...

environ un mois il y a

A résolu


Dominant Matrix - 02
It is a follow-up of the problem 55995. There, you found out whether a matrix is diagonally dominant or not. In this problem, y...

environ un mois il y a

A résolu


First Duplicate
Given an array of integers, return the first duplicate — i.e., the element that appears more than once and whose second appearan...

environ un mois il y a

Charger plus