Gelöst


Guess the number I'm thinking of (Part 1)
In this game you are competing against two other people to guess the number that I'm thinking of. I randomly choose an integer ...

17 Tage vor

Gelöst


Create a random vector of integers with given sum
Your task today is to write a function that returns a vector of integer numbers, between, and including, 1 and m, of which the s...

19 Tage vor

Gelöst


Generate a random matrix A of (1,-1)
Input n: is an positive integer which serves as the dimension of the matrix A; Output: A=(Aij),where each entry Aij is either...

20 Tage vor

Gelöst


Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes. --- If you want to get a random permutation of integer...

20 Tage vor

Gelöst


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

20 Tage vor

Gelöst


Generating random matrix with given probability mass function
Inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2356-simulating-the-selection-of-a-state-with-given-probabilit...

20 Tage vor

Gelöst


Find primes and integers that solve an equation
Write a function to find all primes and non-negative integers that solve the equation where is an integer. If there are no...

20 Tage vor

Gelöst


Given n, create n random numbers such that their standard deviation is also n.
Given n, create n random numbers such that their standard deviation is also n.

21 Tage vor

Gelöst


Compute a sum
Write a function to compute the following sum Although a solution is available for general values of the coefficients, the co...

21 Tage vor

Gelöst


Compute the area of a Q
A figure resembling a Q (as in “quadrature”) is constructed in the following way: A right triangle is drawn with the left vertex...

22 Tage vor

Gelöst


Compute a sum involving the zeta function
Write a function to compute the sum for , where is the zeta function, the subject of Cody Problems 45939, 45988, and 45997.

24 Tage vor

Gelöst


Integrate a power tower
Write a function to compute this integral where . That is, the integrand is (x to the x) to the (x to the x) to the (x to the...

25 Tage vor

Gelöst


Count block fountains
A block fountain consists of rows of circles in which each row is a continuous block of circles (i.e., adjacent circles are tang...

26 Tage vor

Gelöst


Integrate a product of gamma functions
Write a function to compute the following integral: where and is the gamma function, the subject of Cody Problem 46025.

27 Tage vor

Gelöst


Set the Euler-Mascheroni constant with an identity using available MATLAB functions
Cody Problem <https://www.mathworks.com/matlabcentral/cody/problems/42826 42826> asked us to estimate the <https://en.wikipedia....

etwa ein Monat vor

Gelöst


Compute a nested cube root
Consider the quantity . Write a function to compute without using loops or recursion.

etwa ein Monat vor

Gelöst


Compute a sum of Ramanujan
Srinivasa Ramanujan defined the following function: Write a function to compute for various values of . See also Cody Proble...

etwa ein Monat vor

Gelöst


Identify prime words

etwa ein Monat vor

Gelöst


Find jumping medalists

etwa ein Monat vor

Gelöst


Compute Khinchin's constant
Khinchin's constant K_0 = 2.684542001... (also written "Khintchine's constant") has the amazing property that it is the limiting...

etwa ein Monat vor

Gelöst


Compute the nth Pythagorean prime
Pythagorean primes have the form p = 4n+1, where n is an integer, and they can be written as the sum of squares of two integers....

etwa ein Monat vor

Gelöst


Five steps to enlightenment
This problem asks you to identify valid variations of the famous <https://en.wikipedia.org/wiki/Sum_and_Product_Puzzle sum and p...

etwa ein Monat vor

Gelöst


Group-wise Euclidean distance
*Input*: * *x* —— An array of size *n-by-d*, where each row vector denotes a point in a d-dimensional space; * *g* —— A gro...

etwa ein Monat vor

Gelöst


Easy Sequences 32: Almost Pythagorean Triples
An Almost Pythagorean Triple (abbreviated as "APT'), is a set of 3 integers in which square of the largest element, which we wil...

etwa ein Monat vor

Gelöst


Steepest Descent Method
Write a function to find the values of a design variable vector, _x_, that minimizes an unconstrained scalar objective function,...

9 Monate vor

Gelöst


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

10 Monate vor

Gelöst


Monte-Carlo integration
Write a function that estimates a d-dimensional integral to at least 1% relative precision. Inputs: * d: positive integer....

10 Monate vor

Gelöst


Lights Out 15 - 5x5, broken buttons I
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

10 Monate vor

Gelöst


Lights Out 13 - 5x5, three stages, x moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

10 Monate vor

Gelöst


Lights Out 14 - 5x5, four stages, x moves
<https://en.wikipedia.org/wiki/Lights_Out_(game) Lights Out> is a logic game wherein all lights need to be turned off to complet...

10 Monate vor

Mehr laden